Express Generator Without Jade Express Generator Without Jade express express

Express Generator Without Jade


Try running this command in command prompt:

express --help

It will give you the express generator help:

  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

Source: https://expressjs.com/en/starter/generator.html

The above options give you the list of "view engines".

Now, simply type:

express -{your choice view engine}


For example using express -e:

This sets the EJS engine as your view handler and removes jade. EJS has the look and feel of HTML with the added ability to inject values via their template system.


If you won't a view engine just type:

express --no-view

You can add an engine after or not working with server rendering.


You can check the documentation Express-Generator.

As you can see with express -h the view engine suported by express generator are (ejs|hbs|hjs|jade|pug|twig|vash), but by deafult jade is suported.

$ 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-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