Environment Variable Loader
Loading .env in to process.env
Intro
This program strives to be a minimal way of loading variables from a configuration file (.env
), and attaches them to process.env
.
This works similarly to running your program with heroku local
running dotenv.parse()
.
Prerequisites
All you need for this is a file named .env
. Its contents should look like this:
CONTENTFUL_KEY=somesecretkeyCONTENTFUL_SPACE=somespaceurlSECRET_API_KEY_THAT_WONT_GET_POSTED_TO_GIT=whoops
Usage
Simply load the library!
// ES6 imports;// Node module require;