Created
May 17, 2016 09:48
-
-
Save OzieWest/428a33dd5aa1ec59b51b599734ef02d2 to your computer and use it in GitHub Desktop.
node conf example
This file contains hidden or 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
| module.exports.getConfig = (argv) => { | |
| return { | |
| value: process.env.VALUE || argv['value'] || 'default' | |
| } | |
| }; |
This file contains hidden or 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 argv = require('optimist').argv; | |
| var config = require('./config_manager').getConfig(argv); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment