1.1.0 • Published 6 years ago

dashenv v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

@codhek/dashenv

dashenv

npm i dashenv

How to use ?

Save your environment variables in a file -env, pass your path to the -env file and also a callback function to get your environment variables.

Your -env file :

ENDPOINT=http://localhost:3000/graphql
SERVER=development

Use it as follows in the file you want to use your environment variables :

const extract = require('dashenv');

const path = './env_vars/-env';
extract(path, function(env) {
  console.log(env["ENDPOINT"]);
  console.log(env["SERVER"]);
});
1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago