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
Now while we're in the nodeauth
folder, let's just use express
. It will create a bunch of stuff for us. It gave us a bin
folder, public
, routes
, views
, app.js
, and our package.json
. What we'll do is open up the package.json
file and I'll add this project...