fetch-mongo-envs

1.1.1 • Public • Published

Description

Lightweight helper library to fetch environment variables from Mongodb and set these in project.

Installing

Using npm:

$ npm install fetch-mongo-envs

Example

(async() => {
  const { Env } = require('fetch-mongo-envs');
  const env = new Env(yourMongoUri, yourModel || 'environments', codebase || 'project-name', envType || 'production');
  await env.build();
})()

Note

Document schema should be like this:

{
  codebase: "project-name",
  envType: "production",
  envs: {
    FOO: "",
    BAR: "",
    ...
  }
}

Package Sidebar

Install

npm i fetch-mongo-envs

Weekly Downloads

0

Version

1.1.1

License

ISC

Unpacked Size

2.31 kB

Total Files

3

Last publish

Collaborators

  • zayn-m