nanyconfig
v0.0.8
Published
Node wrapper for the anyconfig project
Downloads
18
Readme
nanyconfig
The node wrapper for the anyconfig project
Requirement
You must know what is the anyconfig project.
Usage
const NAnyConfig = require('nanyconfig');
const options = {
token: '013918fe4ab81be96cc52a37ce6dd8db', // the token of the anyconfig project
url: 'http://localhost:8080', // the url of the anyconfig project
timeout: 2000 // http request timeout, default is 5000ms
};
const anyConfig = new NAnyConfig(options);
anyConfig.get('key', function (err, value) {
console.info(value);
});
anyConfig.get('key')
.then(function (value) {
console.info(value);
}).catch(err) {
console.error(err);
});