cz
A simple config utility for nodejs
Example
var config = require('./index.js');
var path = require('path');
config.load(path.normalize(__dirname + '/config.json'));
config.store('disk');
config.set('random', 'random value', true);
console.log('config', config.get());
console.log('db:host', config.get('db:host'));
console.log('db:host+db:username+db:password+db:port', 'mongodb://' + config.get('db:username') + ':' + config.get('db:password') + '@' + config.get('db:host') + ':' + config.get('db:port') + '/' + config.get('db:collection'));
console.log('db:host+db:username+db:password+db:port', 'mongodb://' + config.joinGets(['db:username', 'db:password', 'db:host', 'db:port', 'db:collection'], [':', '@', ':', '/']));