Express is a fast, popular web application framework. We'll be using it as the basis of our Node.js work. We'll discuss using it in more detail later, so for now, let's give ourselves a quick scaffold upon which to work. We're going to install Express and a scaffolding tool globally, as follows:
- Use the command line to install the Express generator, by running the following command: npm install -g express express-generator.
- Use the generator to create a new directory and scaffold the application, by running the following command: express --view=hbs sample && cd sample.
- Your sample directory should now contain a skeleton, like this:
├── app.js
├── bin
│ └── www
├── package.json
├── public
│ ├── images
│ ├── javascripts
│ └── stylesheets
&...