dcon

0.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i dcon

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • tjholowaychuk