Skip to content

BoolJS/booljs-sequelize

Repository files navigation

Build Status License Latest Stable Version Dependency status devDependency status peerDependency status Code Coverage Inline docs Join the chat at https://gitter.im/BoolJS/booljs-sequelize

NPM icon

@booljs/sequelize is a database loader intended to enable developers to use Sequelize in the BoolJS Framework.

Install

Install the package using

npm install @booljs/sequelize

BoolJS Sequelize uses some peerDependencies you must have in your project. We encourage using npm 6+ in all your projects, because is strict in making you declare them in your project.

npm install sequelize@latest

Finally, you might need to get some documentation on the usage of Sequelize. Find it on their website.

Usage

First, register the @booljs/sequelize module in your BoolJS application. Then, add it to the database drivers

In index.js, declare:

const Bool = require('booljs');

async function main () {
    const API = new Bool('com.example.api', [ '@booljs/sequelize' ]);
        .setDatabaseDrivers('booljs.sequelize');

    return API.run();
}

module.exports = main();