Skip to content
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

Add from_filename_override variant to dotenvy_macro #72

Open
nirvdrum opened this issue Mar 26, 2023 · 0 comments
Open

Add from_filename_override variant to dotenvy_macro #72

nirvdrum opened this issue Mar 26, 2023 · 0 comments

Comments

@nirvdrum
Copy link

nirvdrum commented Mar 26, 2023

I may be going about this wrong, but I'm working on a Yew application with some configuration values that need to change based on environment (e.g., GraphQL server URLs). While Rust doesn't have the notion of an "environment" in the same way that JavaScript does, using from_filename I can approximate that and keep the config neatly split into multiple files. However, because this is WebAssembly, I need the values to be read in during compilation. dotenv_macro only supports reading in a file named .env via the dotenv! macro. It'd be quite helpful if there were a corresponding from_filename or from_filename_override! macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant