config-registry

1.0.0 • Public • Published

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

/config-registry/

    Package Sidebar

    Install

    npm i config-registry

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • compuhelmac