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 {
|
||||
var cf = require(confFile);
|
||||
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) {
|
||||
console.log('Could not load config/database.{js|json|yml}');
|
||||
throw e;
|
||||
|
|
Loading…
Reference in New Issue