0.0.0 • Published 6 years ago
@0devs/config-from-json v0.0.0
@0devs/config-from-json
@0devs/onfig plugin for node.js, get config from json files
install
npm install @0devs/config-from-json
usage
var Config = require('@0devs/config');
var jsonPlugin = require('@0devs/config-from-json');
var config = new Config();
config
.use(jsonPlugin)
.from('/configs/config.json', '.')
.from('/configs/api.json', 'api')
.from('/configs/db.json', 'db')
.init()
.then(() => {
console.log(config.get('api.test')));
})
.catch((error) => {
logger.error(error);
});
LICENSE
MIT
0.0.0
6 years ago