Skip to content

eisisig/json-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Loads json file into process.env

Resources

Stars

Watchers

Forks

Packages

No packages published