allow control over sequelize logging using ENV variable
This commit is contained in:
@@ -12,6 +12,7 @@ config.username = process.env.DB_USERNAME || config.username;
|
|||||||
config.password = process.env.DB_PASSWORD || config.password;
|
config.password = process.env.DB_PASSWORD || config.password;
|
||||||
config.database = process.env.DB_NAME || config.database;
|
config.database = process.env.DB_NAME || config.database;
|
||||||
config.port = process.env.DB_PORT || config.port;
|
config.port = process.env.DB_PORT || config.port;
|
||||||
|
config.logging = parseInt(process.env.SEQUELIZE_LOGGING) ? console.log : false;
|
||||||
|
|
||||||
let sequelize;
|
let sequelize;
|
||||||
if (config.use_env_variable) {
|
if (config.use_env_variable) {
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ DB_PASSWORD=Password for the database
|
|||||||
DB_NAME=Database name
|
DB_NAME=Database name
|
||||||
DB_PORT=Database port
|
DB_PORT=Database port
|
||||||
|
|
||||||
|
SEQUELIZE_LOGGING=0- no sequelize logging, 1- log to the console
|
||||||
|
|
||||||
AMAZON_ACCES_KEY_ID=(your-key-here)
|
AMAZON_ACCES_KEY_ID=(your-key-here)
|
||||||
AMAZON_SECRET_ACCESS_KEY=(your-key-here)
|
AMAZON_SECRET_ACCESS_KEY=(your-key-here)
|
||||||
AMAZON_REGION=eu-west-1
|
AMAZON_REGION=eu-west-1
|
||||||
|
|||||||
Reference in New Issue
Block a user