1.1.1 • Published 3 years ago

fetch-mongo-envs v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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: "",
    ...
  }
}
1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago