seperate env variable for test db

This commit is contained in:
cgole 2015-11-18 17:13:06 -08:00
parent 5d95e03d3f
commit 6c3e58f932
1 changed files with 5 additions and 5 deletions

View File

@ -7,11 +7,11 @@ console.log(config)
global.getConfig = function (options) { global.getConfig = function (options) {
var dbConf = { var dbConf = {
host: process.env.MYSQL_HOST || config.host || 'localhost', host: process.env.TEST_MYSQL_HOST || config.host || 'localhost',
port: process.env.MYSQL_PORT || config.port || 3306, port: process.env.TEST_MYSQL_PORT || config.port || 3306,
database: 'myapp_test', database: 'myapp_test',
username: process.env.MYSQL_USER || config.username, username: process.env.TEST_MYSQL_USER || config.username,
password: process.env.MYSQL_PASSWORD || config.password, password: process.env.TEST_MYSQL_PASSWORD || config.password,
createDatabase: true createDatabase: true
}; };
@ -20,7 +20,7 @@ global.getConfig = function (options) {
dbConf[el] = options[el]; dbConf[el] = options[el];
} }
} }
console.log(dbConf)
return dbConf; return dbConf;
}; };