Skip to content

vpsouza/restify-generic-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic Resources for Restify

A small library that adds C.R.U.D. operations to Restify WebServers using SequelizeJS ORM.

Installation

npm install restify-generic-resources

Usage

const genericResources = require('restify-generic-resources');
genericResources.setupAPI(server, '<sequelize-model-name>', <sequelize-models>);

Response

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

Tests

npm test

Contributing

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published