How to use the argv function from nconf
Find comprehensive JavaScript nconf.argv code examples handpicked from public code repositorys.
GitHub: Wercajk/KaThinka
17 18 19 20 21 22 23 24 25 26
* @return {Hash|Boolean} Returns config or false if missing * @api public */ loadConfig: function( defaultConfig ) { return nconf.argv() .overrides( defaultConfig ) .defaults(require('../config.json')) .env() .file({ file: process.cwd() + '/config.json' });
0
5
2
18 19 20 21 22 23 24 25 26 27
env: options => { nconf.env(Object.assign({ transform }, options)); return module.exports; }, argv: options => { nconf.argv(Object.assign({ transform }, options)); return module.exports; }, use: (name, options) => { let store;
0
3
2
30 31 32 33 34 35 36 37 38 39
start () { if(this.started){ return Promise.resolve(this) } this.touchDir('') let file_name = 'config.json' nconf.argv() const config_file = nconf.get('config') if (config_file){ const file_path = Path.parse(config_file) file_name = file_path.base
0
0
2
+ 3 other calls in file