A small library that adds C.R.U.D. operations to Restify WebServers using SequelizeJS ORM.
npm install restify-generic-resources
const genericResources = require('restify-generic-resources');
genericResources.setupAPI(server, '<sequelize-model-name>', <sequelize-models>);
Library should create C.R.U.D endpoints:
GET /<modelName>/:id //GET_BY_ID
PUT /<modelName> //CREATE
POST /<modelName> //UPDATE
GET /<modelName> //LIST-ALL
POST /<modelName> //LIST-ALL WITH FILTER
DEL /<modelName>/:id //DELETE
npm test
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.