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.
30 lines
585 B
30 lines
585 B
const dbConfig = require("../config/db.config.js");
|
|
|
|
const Sequelize = require("sequelize");
|
|
const sequelize = new Sequelize(
|
|
dbConfig.DB,
|
|
dbConfig.USER,
|
|
dbConfig.PASSWORD, {
|
|
host: dbConfig.HOST,
|
|
port: dbConfig.PORT,
|
|
dialect: dbConfig.dialect,
|
|
operatorsAliases: 0,
|
|
|
|
pool: {
|
|
max: dbConfig.pool.max,
|
|
min: dbConfig.pool.min,
|
|
acquire: dbConfig.pool.acquire,
|
|
idle: dbConfig.pool.idle
|
|
}
|
|
});
|
|
|
|
const db = {};
|
|
|
|
db.Sequelize = Sequelize;
|
|
db.sequelize = sequelize;
|
|
|
|
db.voiture = require("./voiture/voiture.model")(sequelize, Sequelize);
|
|
|
|
|
|
module.exports = db;
|