[](https://snyk.io/test/npm/ /wize)
@wize/sequelize-runtime
Description
Registers routes for sequelize models.
Usage
Installation
npm install --save @wize/sequelize-runtime
Initialize
import crud from '@wize/sequelize-runtime';
.
.
.
/*
app: koa-app returned from 'const app = createServer({});'
directory: current directory containing all model folders
source: sequelize object
events: JSON object containing pre and post events to be attached to each route; example: { pre: [setUserObjectInContext], post: []}
*/
crud(app, directory, source, events);
Sample API directory
project
└───api
│ └───audits
│ └───GET
│ │ index.js
│ │ config.json
│ │ index.js
└───sources
│ └───postgres
│ │ index.js
│ app.js
│ README.md
##License MIT License