dcon

Distributed configuration

npm install dcon
2 downloads in the last day
10 downloads in the last week
33 downloads in the last month

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

npm loves you