dotenv-json
Load environment variables via a JSON file
npm install dotenv-json
Define your environment variables in .env.json
in the root of your project (or wherever you start your node process):
Load your environment variables at the beginning of your program:
; console // => s@Mpl3_d@Ta
N.B. Existing keys in process.env
will not be overwritten.
You can customize the location of your .env.json
file by passing a path
option:
const dotenvJSON = ;;