forked from alkemyTech/Skill-Up-JS-Backend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
37 lines (35 loc) · 915 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require("dotenv").config();
module.exports = {
development: {
username: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
host: process.env.DB_HOST,
port: process.env.DB_PORT,
dialect: "mysql",
logging: false, // set to console.log to see the raw SQL queries
native: false, // lets Sequelize know we can use pg-native for ~30% more speed
},
production: {
username: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
host: process.env.DB_HOST,
port: process.env.DB_PORT,
dialect: "mysql",
pool: {
max: 3,
min: 1,
idle: 10000,
},
dialectOptions: {
ssl: {
require: true,
// Ref.: https://github.com/brianc/node-postgres/issues/2009
rejectUnauthorized: false,
},
keepAlive: true,
},
ssl: true,
},
};