bap-cli
v1.1.7
Published
Bap cli
Downloads
4
Readme
Express BAP CLI
This is client cli support generate base file of base project express: github
Required
- nodejs >=8.0
How to install
(sudo) npm install -g bap-cli
How to work
1.0 Init base project
bap init
or
bap init <project>
1.1 Generate controller
bap generate -c <fileName>
or
bap generate --controller <fileName>
- Example
bap generate -c User
File UserController.js
will be created at /projectFolder/app/controllers/Http
1.2 Generate model
bap generate -m <fileName>
or
bap generate --model <fileName>
- Example
bap generate -c User
File User.js
will be created at /projectFolder/app/Models
1.3 Generate repository
bap generate -r <fileName>
or
bap generate --repository <fileName>
- Example
bap generate -r User
File UserRepository.js
will be created at /projectFolder/app/Repositories
1.4 Generate service
bap generate -s <fileName>
or
bap generate -service <fileName>
- Example
bap generate -s User
File UserSerivce.js
will be created at /projectFolder/app/Services
1.5 Generate all file (controller, service, model, repository)
bap generate -a <fileName>
or
bap generate --all <fileName>
- Example
bap generate -a User
File UserController.js
will be created at /projectFolder/app/controllers/Http
File User.js
will be created at /projectFolder/app/Models
File UserRepository.js
will be created at /projectFolder/app/Repositories
File UserSerivce.js
will be created at /projectFolder/app/Services
1.6 Other
- Check version
bap generate -V
or
bap generate --version
- Help
bap generate -h
or
bap generate --help