This is a node.js client for the rest-confidence configuration server
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
README.md
index.js
package.json

README.md

rest-confidence-client

This is a node.js client for the simple rest-confidence configuration server. It hides the REST API details if you do not want to worry about them.

See my the post about "app configuration the easy way" if you plan to use rest-confidence-client.

Usage

Initialize a ConfigurationResolver

var ConfigurationResolver = require('rest-confidence-client');

var resolver = new ConfigurationResolver('http://localhost:8000', {env: 'development'});

Use it with the traditional callback style:

resolver.load('key1', function(err, result) {
    if (err) {
        console.log('Unable to query rest-confidence server');
    } else {
        console.log('Value is', result);
    }
});

Or promise style:

resolver.load('key1')
    .then(function(result) { 
        console.log('Value is', result);
    })
    .fail(function(err) {
        console.log('Unable to query rest-confidence server');
    });

License

MIT