App and middleware setup

In this section, we'll create our application. We'll be using Express and we'll use something called the Express generator, which will allow us to just type in a command and have it generate a bunch of files and folders for us that we can use in our app.

Let's create a folder, you can create it wherever you want, and mine's going to be in my Projects folder. We'll call it nodeauth. Now inside the folder, I'll open my command line in that folder using Git Bash. So you want to make sure you have Express installed globally so you can access it from anywhere and also the Express generator. So we'll run the following command:

npm install -g express

Then we also want to run the following command:

install -g express-generator ...

Get Learn Node.js by Building 6 Projects. now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.