nconf-lite/test/fixtures/scripts/nconf-hierarchical-file-argv.js

17 lines
410 B
JavaScript
Raw Normal View History

/*
* nconf-hierarchical-file-argv.js: Test fixture for using optimist defaults and a file store with nconf.
*
* (C) 2011, Nodejitsu Inc.
* (C) 2011, Sander Tolsma
*
*/
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')
});
process.stdout.write(nconf.get('something') || 'undefined');