How to load environment from .env
files
#1022
DenuxPlays
started this conversation in
General
Replies: 3 comments 1 reply
-
Current workaround: dotenvy::dotenv().expect("Failed to load .env file"); Also add dotenvy as a dependency: dotenvy = "0.15.7 |
Beta Was this translation helpful? Give feedback.
0 replies
-
we leave .env loading for the user. this can be done via adding |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I've set up my development.yaml file to load env vars but it seems that the whole parsing process does not load a .env file before parsing the config.
To Reproduce
Add this to your config:
Now execute:
See a parsing error.
Expected Behavior
Load the env vars from the
.env
file.Environment:
Additional Context
/
Beta Was this translation helpful? Give feedback.
All reactions