express-sequelize-crud-router

1.0.3 • Public • Published

express-sequelize-crud-router npm npm JavaScript Style Guide npm

express CRUD router based on a sequelize model

Install

npm i -S express-sequelize-crud-router
or
npm install --save express-sequelize-crud-router

Use

Require and initialize with the sequelize and an optional debug instance:

const debug = require('debug')('backend:routes:doc')
const CRUDRouter = require('express-sequelize-crud-router')
 
const model = require('./my-sequelize-models').model
 
const router = CRUDRouter({model, debug})
 
// More routes
router.get('/custom', ...)
 
module.exports = router

Related

License

MIT Copyright © Diego Rodríguez Baquero

Package Sidebar

Install

npm i express-sequelize-crud-router

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

5.03 kB

Total Files

4

Last publish

Collaborators

  • diegorbaquero