how to use express generator code example

Example 1: EXPRESS generator

$ npm install express-generator -g

Example 2: install express

npm i express

Example 3: initialize express app

npx express-generator

Example 4: npx create-express-api

npm install -g create-express-api

Example 5: generate express app

$ npx express-generator

Example 6: EXPRESS generator

$ express -h

  Usage: express [options][dir]

  Options:

    -h, --help          output usage information
        --version       output the version number
    -e, --ejs           add ejs engine support
        --hbs           add handlebars engine support
        --pug           add pug engine support
    -H, --hogan         add hogan.js engine support
        --no-view       generate without view engine
    -v, --view <engine> add view <engine> support (ejs|hbs|hjs|jade|pug|twig|vash) (defaults to jade)
    -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