api-creator-cli
v0.0.3
Published
A CLI that creates server.js and routes.js with express
Downloads
5
Maintainers
Readme
api-creator-cli CLI
Quick creation of an API for Node
A CLI that use Express to create a simple API with a server.js and routes.js
Installation
This is a Node.js module avaliabe through the npm register
Before installing, download and install Node.js. Node.js 0.10 or higher is required.
Installation is done using the npm install command:
$ npm install api-creator-cli
Command Reference for api-creator-cli
There are only two commands:
- api generate-server
- api generate-routes (your route name)
Usage
api generate-server
/your-directory> api generate-server
if this command run correctly this message must be apear:
Server da API criado com sucesso!
api generate-routes [your route]
/your-directory> api generate-routes banana
if this command run correctly this message must be apear:
A rota banana foi criada com sucesso!
Test
Make sure to have jest in your code enviroment. If you don't have, follow the next steps
$ npm install -g jest
and then execute the test. If you already have the Jest, just execute the test.
$ npm test
License
MIT