json-env
v1.0.1
Published
Loads a json file into process.env
Downloads
1
Readme
json-env
Loads json file into process.env
Getting started
npm install json-env
Require as soon as possible. This used sync to open the file to be sure that nothing runs until this is done.
require('json-env')();
You can load a specific file or overwrite env variables with another require
require('json-env')('myconfig.json');
require('json-env')(); // loads .env.json by default
require('json-env')('.env.overwrite.json'); // overwrites keys already in process.env