json-env

1.0.1 • Public • Published

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
 

/json-env/

    Package Sidebar

    Install

    npm i json-env

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • eisisig