Appearance
Usage
Here are some uses of the cli on tools-web.
Express
Basic command:
Start command
bashexpress -hexpress -hCreate new project
bash# template choice is "dust", "ejs", "hbs", "hjs", "jade", "pug", "twig" # db choice is "mongoose", "sequelize" express make:project --template ejs --db mongoose# template choice is "dust", "ejs", "hbs", "hjs", "jade", "pug", "twig" # db choice is "mongoose", "sequelize" express make:project --template ejs --db mongooseCreate new api
bashexpress make:api user --db mongoose --col name,email,phoneexpress make:api user --db mongoose --col name,email,phoneCreate new model
bashexpress make:model User --db mongoose --col name,email,phoneexpress make:model User --db mongoose --col name,email,phoneRun the server on the background
bashexpress devexpress devWARNING
don't be remove on this line at app.js
javascript// catch 404 and forward to error handler app.use(function (req, res, next) { next(createError(404)); });// catch 404 and forward to error handler app.use(function (req, res, next) { next(createError(404)); });
Cheatsheet
| Command | Description | Arguments | Options |
|---|---|---|---|
| make:project | Create new project | ||
| server:dev | Run the server application on the background | ||
| make:model | Generate model | <name> | |
| make:api | Generate api | <name> |