seperate env variable for test db
This commit is contained in:
parent
5d95e03d3f
commit
6c3e58f932
10
test/init.js
10
test/init.js
|
@ -7,11 +7,11 @@ console.log(config)
|
|||
global.getConfig = function (options) {
|
||||
|
||||
var dbConf = {
|
||||
host: process.env.MYSQL_HOST || config.host || 'localhost',
|
||||
port: process.env.MYSQL_PORT || config.port || 3306,
|
||||
host: process.env.TEST_MYSQL_HOST || config.host || 'localhost',
|
||||
port: process.env.TEST_MYSQL_PORT || config.port || 3306,
|
||||
database: 'myapp_test',
|
||||
username: process.env.MYSQL_USER || config.username,
|
||||
password: process.env.MYSQL_PASSWORD || config.password,
|
||||
username: process.env.TEST_MYSQL_USER || config.username,
|
||||
password: process.env.TEST_MYSQL_PASSWORD || config.password,
|
||||
createDatabase: true
|
||||
};
|
||||
|
||||
|
@ -20,7 +20,7 @@ global.getConfig = function (options) {
|
|||
dbConf[el] = options[el];
|
||||
}
|
||||
}
|
||||
|
||||
console.log(dbConf)
|
||||
return dbConf;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue