Skip to content

Commit

Permalink
🐛 argv config overrides (#7493)
Browse files Browse the repository at this point in the history
refs #7492

- this is just a temporary solution
  • Loading branch information
kirrg001 authored and ErisDS committed Oct 5, 2016
1 parent c4e47c9 commit bb07096
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/server/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ nconf.env();

/**
* load config files
* @TODO:
* - why does this work? i have no idea!
* - find out why argv override works, when defining these weird keys
* - i could not find any nconf usages so that all config requirements work
*/
nconf.file('1', __dirname + '/overrides.json');
nconf.file('2', path.join(process.cwd(), 'config.' + env + '.json'));
nconf.file('3', __dirname + '/env/config.' + env + '.json');
nconf.file('4', __dirname + '/defaults.json');
nconf.file('ghost1', __dirname + '/overrides.json');
nconf.file('ghost2', path.join(process.cwd(), 'config.' + env + '.json'));
nconf.file('ghost3', __dirname + '/env/config.' + env + '.json');
nconf.file('ghost4', __dirname + '/defaults.json');

/**
* transform all relative paths to absolute paths
Expand Down

0 comments on commit bb07096

Please sign in to comment.