Setting Up a Svelte Local Development Environment

Setting up your local development environment

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

  • |

Lesson Transcript

  • [00:00 - 00:14] Now that we've covered the high-level design for our application, we can talk development environments set up. So for our app, we will run a local Svelte environment and also a local Express environment.

  • [00:15 - 00:26] And for both of those, we'll need Node.js. If you don't already have Node, head over to Node.js.org and download the appropriate installer for your operating system.

  • [00:27 - 00:39] In addition to Node, we'll also need Git. And we don't need Git from a source control perspective, but it's required for just one step, which is the Svelte project initialization.

  • [00:40 - 00:49] Of course, you can also use it for source control too. And then this project will use a lot of command line operations.

  • [00:50 - 00:59] And so optionally, it's nice to have a more powerful command line tool. For Macs, Iterm2 is a good option.

  • [01:00 - 01:08] And for Windows, Commander is a good option. And both of these offer tab-based command line instances.

  • [01:09 - 01:19] So you can have multiple tabs or multiple command line instances open at once. And this can be helpful when you're trying to run several things at once.

  • [01:20 - 01:32] For Commander, you may need to edit your path system environment variable. And essentially what this means is just pointing your path to the bin directory for the commands you want to run.

  • [01:33 - 01:40] For example, the node command and the git command. So here's a look at Iterm2.

  • [01:41 - 01:48] And in my setup, I can run a node command from any directory. So for example, I can run node-b.

  • [01:49 - 02:02] And that'll tell me the version of node or any other node command. And likewise, I can also run a git command from any directory as well.

  • [02:03 - 02:21] So if you're having a little bit of trouble, you may need to look at some tutorials and figure out how to point your path to those executables that you want to run. And then lastly, we're going to need a nice text editor.

  • [02:22 - 02:33] And VS code is a fantastic open source option that's becoming really popular for JavaScript development. Here's a quick look at VS code.

  • [02:34 - 02:42] And VS code lets you have multiple files open at once. And it does a lot of really nice code highlighting.

  • [02:43 - 02:54] There's various plug-ins that help you with formatting. And it also has an integrated terminal and an integrated git instance.

  • [02:55 - 03:19] And you can browse around the files on the left-hand panel here within your project so you can pretty easily move in between files. So, as we spoke before, the project will be organized into a school lunch overarching directory and then a backend directory and a front-end directory underneath that.

  • [03:20 - 03:36] The source code for the backend express app and the front-end spelt app will be able to run separately in the local environment. So it will keep them separate from an organization perspective in the file system.

  • [03:37 - 03:53] So we can go ahead for the last step in this lesson, we can go ahead and create the overarching school lunch directory. So I'm just going to run an MKDRE school lunch and that'll create that directory.

  • [03:54 - 04:28] Now in the next lesson, we'll initialize the spelt project which will create the front-end directory and create a lot of boilerplate spelt files to get a spelt project up and running. [ Silence ]