Created
July 10, 2013 22:53
-
-
Save gregberge/5970919 to your computer and use it in GitHub Desktop.
Simple configuration module using nconf.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nconf = require('nconf'); | |
module.exports = nconf | |
.env() | |
.file(__dirname + '/config.json') | |
.file('env', __dirname + '/config.' + nconf.get('NODE_ENV') + '.json') | |
.file('user', __dirname + '/config.' + nconf.get('NODE_ENV') + '.' + nconf.get('USER') + '.json'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nope, in fact it doesn't work, it was working only because of the name "env", we have to dig deeper…