npm install express-generator -gThe generator has a number of options, which you can view on the command line using the —help (or -h) command:
> express --help
Usage: express [options] [dir]
Options:
--version output the version number -e, --ejs add ejs engine support --pug add pug engine support --hbs add handlebars engine support -H, --hogan add hogan.js engine support -v, --view <engine> add view <engine> support (dust|ejs|hbs|hjs|jade|pug|twig|vash) (defaults to jade) --no-view use static html instead of view engine -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 -h, --help output usage informationYou can specify express to create a project inside the current directory using the Jade view engine and plain CSS (if you specify a directory name then the project will be created in a sub-folder with that name).
expresssee example below
express projectname --view=pugAfter everything has been done
change directory: > cd projectname
install dependencies: > npm install
run the app (Bash (Linux or macOS)) > DEBUG=projectname:* npm start
run the app (PowerShell (Windows)) > $ENV:DEBUG = "projectname:*"; npm start
run the app (Command Prompt (Windows)): > SET DEBUG=projectname:* & npm start