Skip to content

Instantly share code, notes, and snippets.

@OzieWest
Created May 17, 2016 09:48
Show Gist options
  • Select an option

  • Save OzieWest/428a33dd5aa1ec59b51b599734ef02d2 to your computer and use it in GitHub Desktop.

Select an option

Save OzieWest/428a33dd5aa1ec59b51b599734ef02d2 to your computer and use it in GitHub Desktop.
node conf example
module.exports.getConfig = (argv) => {
return {
value: process.env.VALUE || argv['value'] || 'default'
}
};
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