With this package you can create a basic structure of api project with express and body-parser.
The package crete the next structure:
.
|____.git
|____.gitignore
|____components
| |____example
| | |____controller.js
| | |____network.js
|____index.js
|____package-lock.json
|____package.json
|____response
| |____response.js
npm install -g bootstrap-api-express
mkdir api
cd api
Execute bootstrap-api-express specifying the end-points you want to create, for example users and chats.
bootstrap-api-express users chats
The package will create the end-points for user and chats, if you don't specify anything the package will create the example end-point.
Run the next command and check the end-points created.
node index.js
GET api/users/
POST api/users/
DELETE api/users/:id
UPDATE api/users/:id
GET api/chats/
POST api/chats/
DELETE api/chats/:id
UPDATE api/chats/:id
If someone wants to add or improve something, I invite you to collaborate directly in this repository: bootstrap-api-express
create-api-express is released under the MIT License.