1.0.1 • Published 9 years ago
json-env v1.0.1
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