参考:
基础
//安装
$ npm install express-generator -g
//查看帮助
express -h
//启动
set DEBUG=myapp:* npm start //window
DEBUG=myapp:* npm start//linux | max
express -h
//通过【-help】命令,得到主要是选择模板引擎
Options:
-h, --help output usage information
--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 (ejs|hbs|hjs|jade|pug|twig|va
sh) (defaults to jade)
-c, --css <engine> add stylesheet <engine> support (less|stylus|compass|sa
ss) (defaults to plain css)
--git add .gitignore
-f, --force force on non-empty directory
基本插件
1.debug
2.morgan 日志插件(支持直接输出到文件)
3. serve-favicon