npm add @dotenv-run/load
console.log(process.env.API_USERS);
Given the following .env files:
.env
.env API_USERS=$API_BASE/v1/users API_AUTH=$API_BASE/v1/auth.env.dev API_BASE=https://localhost:3000.env.prod API_BASE=https://dotenv-run.app
NODE_ENV=dev node -r @dotenv-run/load ./index.jshttps://localhost:3000/v1/users
NODE_ENV=prod node -r @dotenv-run/load ./index.jshttps://dotenv-run.app/v1/users
NODE_ENV=prod NODE_OPTIONS='-r @dotenv-run/load' node ./index.jshttps://dotenv-run.app/v1/users