Allow database.js to export function(compound)
This commit is contained in:
parent
3a355851b6
commit
029dfb6f3b
|
@ -30,7 +30,11 @@ module.exports = function init(root) {
|
||||||
try {
|
try {
|
||||||
var cf = require(confFile);
|
var cf = require(confFile);
|
||||||
if (cf instanceof Array) cf = cf[0];
|
if (cf instanceof Array) cf = cf[0];
|
||||||
config = cf[app.set('env')];
|
if (typeof cs === 'function') {
|
||||||
|
config = cs(railway);
|
||||||
|
} else {
|
||||||
|
config = cf[app.set('env')];
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('Could not load config/database.{js|json|yml}');
|
console.log('Could not load config/database.{js|json|yml}');
|
||||||
throw e;
|
throw e;
|
||||||
|
|
Loading…
Reference in New Issue