-
-
Notifications
You must be signed in to change notification settings - Fork 838
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
Load .envrc files like direnv. #113
Comments
I'd suggest using the custom path option if you know you're looking for const dotenv = require('dotenv')
dotenv.config()
dotenv.config({ path: '.envrc' }) |
Thanks @maxbeatty, I'll try that. |
@adjohnson916 This should work for very specific cases where you are absolutely sure that your Also, I'm just curious to hear of other people's workflow...if you are already using |
@wilmoore I figured. Why? Might not be running the app from the current working directory, or from a different user account e.g. a system account that's not running with a shell and/or doesn't have |
Thanks @adjohnson916 -- good to know. |
Either in addition to or as a fallback in case of missing
.env
file, it may be nice to also check for.envrc
file, e.g. from direnv, and gracefully attempt to parse & load it.Probably relies on an implementation of #112.
The text was updated successfully, but these errors were encountered: