This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@wize/sequelize-runtime

3.2.6 • Public • Published

[![Known Vulnerabilities](https://snyk.io/test/npm/ /wize/badge.svg)](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

Dependencies (11)

Dev Dependencies (20)

Package Sidebar

Install

npm i @wize/sequelize-runtime

Weekly Downloads

3

Version

3.2.6

License

MIT

Unpacked Size

199 kB

Total Files

71

Last publish

Collaborators

  • at1nder
  • harishtejwani
  • praveennegi