We have config files for each environment, sharing the same function signatures. Our build script chooses the right one and creates a symlink to it. This is inspired by https://github.com/iosphere/elm-i18n. Then, we can import the config module (which is a symlink to either of the actual implementations) in every file where environment-specific config is needed. Highly recommended!
runarfu
7
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Dependency Injection: How to switch API server? | 12 | 4188 | February 7, 2018 | |
| Whats the best way to test routing locally? | 6 | 600 | November 27, 2023 | |
| How do you host client-side-only elm SPA | 9 | 454 | September 26, 2024 | |
| Use enviroment variables anytime, anywhere in your Elm program | 4 | 2797 | September 26, 2019 | |
| Parse Initial URL without Handling Changes | 11 | 1409 | November 20, 2019 |