skyer-sequelize-component

Skyer sequelize component

Usage no npm install needed!

<script type="module">
  import skyerSequelizeComponent from 'https://cdn.skypack.dev/skyer-sequelize-component';
</script>

README

skyer-sequelize-component

npm version

Skyer sequelize component.

Install

NPM

$ npm i --save skyer-sequelize-component

Register

/app/components/sequelize.component.js

module.exports = require('skyer-sequelize-component');

Or

Register component by config/components.js file.

Usage

const sequelize = skyer.component.get('sequelize');

const UserModel = sequelize.model('User');

console.log(sequelize.isDefined('User'));

const user = yield UserModel.create({
  name: 'jerry wu',
  organization: 'skyer-team'
});

Options

See Sequelize options

Example

See skyer-example

Licences

MIT