/egg-tiaozhan-sequelize-typescript

A compatible plugin for standard sequelize and sequelize-typescript

Primary LanguageJavaScriptMIT LicenseMIT

egg-tiaozhan-sequelize-typescript

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Reference

https://github.com/xvsuper/ts-egg-sequelize

Install

$ npm i egg-tiaozhan-sequelize-typescript --save

Usage

// {app_root}/config/plugin.js
exports.sequelize = {
  enable: true,
  package: 'egg-tiaozhan-sequelize-typescript',
};

Configuration

import { Sequelize } from 'sequelize-typescript';

config.sequelize = {
  Sequelize, // !!IMPORTANT!!
  dialect: 'mysql',
  host: '127.0.0.1',
  port: 3306,
  username: 'root',
  password: '',
  database: 'egg',
}

Example

https://github.com/RobinBuschmann/sequelize-typescript

Questions & Suggestions

Please open a PR

License

MIT