omni-express
v1.0.4
Published
omni-express CLI
Downloads
2
Maintainers
Readme
omni-express
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js 8.0.0 or higher is required.
Using npm
$ npm install -g omni-express
Using yarn
$ yarn global add omni-express
Create the project:
Using npm
$ omni-express new myProject
Using yarn
$ omni-express new myProject --yarn
New project flags
--code - To open vscode after creation --no-git - To disable git init
Create new component:
$ omni-express generate:component myNewComponent
or
$ omni-express g:c myNewComponent
Create new middleware:
$ omni-express generate:middleware myNewMiddleware --global /local
or
$ omni-express g:m myNewMiddleware --global/local
- global to set app.use(myNewMiddleware)
- local to use on one or more route(s)
Folder structure
|-- root folder
| +--● bin
| | |--- server.js
| |
| +--● src
| | +---● components
| | | +--● default
| | | | +--● controller
| | | | |-- index.js
| | | |-- router.js
| | |
| | +---● middleware
| | |-- setHeaders.js
| |
| +--- app.js
| |
| |--- routes.js
|
|-- index.js