Skip to content

Handle environment configs on mongo database to be shared across multiple microservices

License

Notifications You must be signed in to change notification settings

helmac/config-registry

Repository files navigation

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

About

Handle environment configs on mongo database to be shared across multiple microservices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published