envgrabber

0.0.7 • Public • Published

envGrabber

A simple script to pull environment variables from a GCP Storage bucket a sets them in your app. Designed to work with Google App Engine Standard Node.js environment out of the box


Usage :

yarn add envgrabber

in your app

const envGrabber = require('envgrabber');

(async () => {
  await envGrabber({
    bucketName: 'my_super_secret_bucket',
    fileName: '.env', // optional, '.env' is assumed.
  });
  console.log(process.env.MY_ENV_VAR);
})()

Authentication :

If the Storage bucket and your app are in the same project you won't need to do any authentications. If you'd like to use the module outside GAE, you'll have to make sure you've authenticated your local machine or started your app with the proper authentication environment variables.

Readme

Keywords

none

Package Sidebar

Install

npm i envgrabber

Weekly Downloads

8

Version

0.0.7

License

MIT

Unpacked Size

100 kB

Total Files

7

Last publish

Collaborators

  • ehab_khaireldin