const Sequelize = require('sequelize');
const config = require('./config');
const db = {};

const connect = new Sequelize(config.database_name, config.username, config.password, {
    host: config.hostname,
    dialect: 'mysql',
    operatorsAliases: false,
    pool: {
        max: 5,
        min: 0,
        acquire: 30000,
        idle: 10000
    }
})
db.sequelize = connect
db.Sequelize = Sequelize

module.exports = db 