allow control over sequelize logging using ENV variable

This commit is contained in:
Bilal Catic
2019-09-05 13:50:13 +02:00
parent 08f73445e9
commit f311404968
2 changed files with 3 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ config.username = process.env.DB_USERNAME || config.username;
config.password = process.env.DB_PASSWORD || config.password;
config.database = process.env.DB_NAME || config.database;
config.port = process.env.DB_PORT || config.port;
config.logging = parseInt(process.env.SEQUELIZE_LOGGING) ? console.log : false;
let sequelize;
if (config.use_env_variable) {