mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
This is done in order to have config creation rules unified in one place to avoid modifying them multiple times if they change. We already had 3 duplicated pieces of code initializing the config and there will be more config uses in future tests. This resolves #1960
6 lines
211 B
JavaScript
6 lines
211 B
JavaScript
module.exports = require('nconf')
|
|
.argv()
|
|
.env({ lowerCase: true })
|
|
.file('environment', { file: `config/${process.env.NODE_ENV}.json` })
|
|
.file('defaults', { file: 'config/default.json' });
|