mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-02 17:12:45 +00:00
[NFC] Outline config creation into a separate module
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
This commit is contained in:
5
server/config.js
Normal file
5
server/config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = require('nconf')
|
||||
.argv()
|
||||
.env({ lowerCase: true })
|
||||
.file('environment', { file: `config/${process.env.NODE_ENV}.json` })
|
||||
.file('defaults', { file: 'config/default.json' });
|
||||
Reference in New Issue
Block a user