1.0.8 • Published 6 years ago
betterconfig v1.0.8
Client library to access your BetterConfig project's configurations
Installation
npm install betterconfig
Usage
// Get a reference to the BetterConfig library'
var getBetterConfig = require('betterconfig');
// The url to your BetterConfig project's configuration
var configUrl = '<Get your config URL at betterconfig.com>';
// Prepare for failures by adding your default values here
var defaultConfig = {
"key1": "value1",
"key2": "value2",
}
// Get your latest configuration values
getBetterConfig(configUrl, defaultConfig, function (config) {
console.log(config.key1);
console.log(config.key2);
});
License
MIT