0.1.0 • Published 11 years ago
dcon v0.1.0
dcon
Simple distributed configuration via redis.
Installation
$ npm install dcon
Command line
List config:
$ dcon
{
"name": "Cloudup",
"url": "https://cloudup.com"
}
Set config:
$ dcon name Something
$ dcon url http://something.com
$ dcon
{
"name": "Something",
"url": "http://something.com"
}
Get config:
$ dcon name
Something
Example
var Config = require('./');
var conf = new Config('cloudup');
conf.on('change', function(){
console.log(conf);
});
setInterval(function(){
conf.set('foo', Math.random() * 5 | 0)
}, 500);
setInterval(function(){
conf.set('bar', Math.random() * 15 | 0)
}, 50);
License
MIT