Join Ray Villalobos for an in-depth discussion in this video Installing Node.js, part of Building a Website with Node.js and Express.js (2014).
Before we get going with Node and Express, you have to have Node JS installed on your machine. And that's a pretty straightforward installation. In this video I want to walk you through installing and testing out Node on a Mac and a PC. I'm first going to go through doing this on a Mac. If you think you already have Node JS installed on your machine, you can test it out by typing in, node minus, minus, version. You should see something return like this. If you don't get a version number then you need to go to the Node JS website and click on this install button right here.
This will download an installer into your default downloads directory. Once that's done downloading, you can go into your downloads folder and run the Node JS package. You can hit continue and just follow the prompts. You may have to type in your password. Once this finishes installing, you can go back to your terminal and type in node minus, minus version. You should now see a version number. So let's take a look at what it takes to install this and use it on a PC.
To see if you have node.js installed, make sure you go the Start menu on your computer, and then see if you've got a node.js command prompt installed. This is not the same as your regular DOS command prompt, but it looks very similar. If you open this up, and you're able to type in, node minus, minus version, when you hit Return you should see a version number. If you don't have a copy of node.js installed. Go to the node.js.org website and click on the install button and I'm going to hit run and once the installer gets going, click through the Command prompts here.
Once node JS installs. Go back into your Start menu, and you should see the Node.js command prompt. Click on that and type in Node minus, minus version and make sure that a version shows up once you install the program. Installing Node.js is the first step to running Node.js with express.
- Installing Node.js and Express.js
- Exploring the node package manager (npm)
- Creating and modularizing routes
- Using templates
- Adding partials
- Using the Express Generator
- Preparing your site structure
- Adding static content
- Importing your data
- Passing custom data through routes
- Publishing your application