Added db username password
This commit is contained in:
parent
f255850382
commit
da879ea47f
|
@ -3,15 +3,15 @@ module.exports = require('should');
|
||||||
var DataSource = require('loopback-datasource-juggler').DataSource;
|
var DataSource = require('loopback-datasource-juggler').DataSource;
|
||||||
|
|
||||||
var config = require('rc')('loopback', {test: {mysql: {}}}).test.mysql;
|
var config = require('rc')('loopback', {test: {mysql: {}}}).test.mysql;
|
||||||
|
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.MYSQL_HOST || config.host || 'localhost',
|
||||||
port: process.env.MYSQL_PORT || config.port || 3306,
|
port: process.env.MYSQL_PORT || config.port || 3306,
|
||||||
database: 'myapp_test',
|
database: 'myapp_test',
|
||||||
username: config.username,
|
username: process.env.MYSQL_USERNAME || config.username,
|
||||||
password: config.password,
|
password: process.env.MYSQL_PASSWORD || config.password,
|
||||||
createDatabase: true
|
createDatabase: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue