2011-10-23 08:30:51 +00:00
|
|
|
/*
|
2015-07-07 20:06:41 +00:00
|
|
|
* nconf-hierarchical-file-argv.js: Test fixture for using yargs defaults and a file store with nconf.
|
2011-10-23 08:30:51 +00:00
|
|
|
*
|
2014-11-26 06:31:48 +00:00
|
|
|
* (C) 2011, Charlie Robbins and the Contributors.
|
2011-10-23 08:30:51 +00:00
|
|
|
* (C) 2011, Sander Tolsma
|
|
|
|
*
|
|
|
|
*/
|
2014-11-26 06:31:48 +00:00
|
|
|
|
2011-10-23 08:30:51 +00:00
|
|
|
var path = require('path'),
|
|
|
|
nconf = require('../../../lib/nconf');
|
|
|
|
|
|
|
|
nconf.argv();
|
|
|
|
nconf.add('file', {
|
2011-11-23 21:39:30 +00:00
|
|
|
file: path.join(__dirname, '../hierarchy/hierarchical.json')
|
2011-10-23 08:30:51 +00:00
|
|
|
});
|
|
|
|
|
2015-07-07 20:06:41 +00:00
|
|
|
process.stdout.write(nconf.get('something') || 'undefined');
|