You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
381 B

5 years ago
import {Sequelize} from 'sequelize-typescript';
const env = process.env.NODE_ENV || 'development';
const config = require(__dirname + '/../../config/config.json')[env];
const sequelize = new Sequelize({
...config,
logging: process.env.SQL_LOG==='true' ? console.log : false,
models: [__dirname + '/ts']
})
const models = sequelize.models
export {
sequelize,
models,
}