_index.ts 278 Bytes
Newer Older
chinguyen's avatar
chinguyen committed
1 2 3 4 5 6 7 8 9 10 11 12 13
import { Sequelize } from 'sequelize'

const config = require('../config/config.json')

const dbConfig = config[process.env.NODE_ENV]
const sequelize = new Sequelize(
  dbConfig['database'],
  dbConfig['username'],
  dbConfig['password'],
  dbConfig
)

export default sequelize