Hey everyone I remember…
Hey everyone, I remember someone was saying (could have been another channel) that they have a “build once and deploy everywhere” rule and env files are loaded in app initializer token based on domain. If this was you I’d be curious if you have an example or if there were any specific learnings. Thanks!
Responses:
We inject configurations using the standard way of file replacements per configuration. However, in one of our setups- nginx and docker- we can override them using env variables.
When the server is started, it checks for a env variable and injects it into a script tag in the index page of type application/json. When JavaScript loads, it looks for the content of that application/json, and gives priority to the deserialized object over the built values.
It worked fine, in special to make fast fixes without recompiling (we used in localized Angular 8 apps, where each deploy required 6 compilations)
Yes that was me… Busy today, maybe tomorrow
All good thanks no rush, more curious!
Also thanks
Here was the original thread <https://nrwlcommunity.slack.com/archives/CMFKWPU6Q/p1591794234236900?thread_ts=1591794234.236900&cid=CMFKWPU6Q | https://nrwlcommunity.slack.com/archives/CMFKWPU6Q/p1591794234236900?thread_ts=1591794234.236900&cid=CMFKWPU6Q> |
Thanks
Happy to go into more detail or answer specific questions
I will let you know if I have any.