config-registry
v1.0.0
Published
Handle environment configs on mongo database to be shared across multiple microservices
Downloads
4
Maintainers
Readme
config-registry
Handle environment configs on mongo database to be shared across multiple microservices
Installation
$ npm install --save config-registry
Usage
const ConfigRegistry = require('config-registry');
var configRegistry = new ConfigRegistry({
env: 'dev',
collection: '<registyCollectionName>',
name: '<configName>',
db: {
url: '<mongoCnxString>'
}
});
configRegistry
.getConfig()
.then((config) => {
// use config object config.<key>
})
.catch((error) => {
// handle error
});
License
MIT © Helmac.ca