1.0.0 • Published 7 years ago

config-registry v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

config-registry NPM version Build Status Dependency Status

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