New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for a dotenv per environment #740
Comments
Something like this would be helpful for me too. I'm not currently using different .env files, but I would like to store a few .http files in a folder. That would mean they wouldn't be in the project root with my .env file. If we could provide a relative path to a specific .env file, then @elpablete and my issue would possibly both be addressed. |
usually such files are named like so
|
I'd love this as well, but until (if?) this is done, there's a workaround. In your
In your
Finally in your http file you'd have this.
A little more complicated to setup, but this allows the values you use to change when you change the environment. This is untested and may need some tweaking, but the idea should work. |
Would it be possible to try to load first .env.{{environmentName}} with environmentName the name of the currentEnvironment (e.g. .env.local, env.dev, ...) |
I would love to have this feature too! |
Many times I find myself with an .env file per environment (local.env, test.env, prod.env), that way I can use the same names on my code and still not commit any values to repos. Right now there is no way to do so, but a more powerful feature would be to allow a different .env file to be defined in each environment (even in $shared)
The text was updated successfully, but these errors were encountered: