Hacker News new | past | comments | ask | show | jobs | submit login

Would be nice to be able to configure which .env file to read as an environment variable. Why? Imagine a package.json with this line:

`start: dotenvx run -f .env.local -f .env -- node index.js`

Instead of the -f flag, which now cannot be overriden, one could invoke it with

`DOTENV=.env.staging npm run start`




You can, you just need to define the private key.

For example

DOTENV_PRIVATE_KEY_PRODUCTION

Would provide it with the information it needs to read .env.production


Or just have the environment variable used after the flags are processed




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: