Fix for reading yml files
This commit is contained in:
parent
1088146986
commit
c7409be559
|
@ -28,7 +28,9 @@ module.exports = function init(root) {
|
|||
var config = {};
|
||||
|
||||
try {
|
||||
config = require(confFile)[app.set('env')];
|
||||
var cf = require(confFile);
|
||||
if (cf instanceof Array) cf = cf[0];
|
||||
config = cf[app.set('env')];
|
||||
} catch (e) {
|
||||
console.log('Could not load config/database.{js|json|yml}');
|
||||
throw e;
|
||||
|
|
Loading…
Reference in New Issue