ksr

koa-sequelize-restifier

An NPM module to restify models with minimal work

Showing:

Popularity

Downloads/wk

9

GitHub Stars

6

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

1

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Koa/Sequelize Restifier

Installation

$ npm install koa-sequelize-restifier

Usage

Simple restification

var Restifier = require( 'koa-sequelize-restifier' )
var app = require( 'koa' )()
var router = require( 'koa-router' )()

var Job = require( './models/Job' ) //Your Sequelize model
var restifier = new Restifier()

restifier.restify( router, Job )
// Maps the following urls
//   GET    /jobs
//   POST   /jobs
//   GET    /jobs/:id
//   PATCH  /jobs/:id
//   DELETE /jobs/:id

app.use( router.routes() )

app.listen( 8888, function(){
  console.log( 'App is listening' )
})

This module is provided as is, without warranty. If you open a Github issue, I may consider your request.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial