Using the express generator tool we can quickly and easy create an application skeleton.
Install express generater
npm install express-generator -g
Use express -h for help
express -h Usage: express [options] [dir] Options: -h, --help output usage information -V, --version output the version number -e, --ejs add ejs engine support (defaults to jade) --hbs add handlebars engine support -H, --hogan add hogan.js engine support -c, --css <engine> add stylesheet <engine> support (less|stylus|compass|sass) (defaults to plain css) --git add .gitignore -f, --force force on non-empty directory
Creating Express application with express generator
syntax
express <options> <application_name>
eg
express myapp
It will create the folder structure and some required files
Go inside your app folder and execute npm install
It is ready to start the server
ref : https://expressjs.com/en/starter/generator.html