For example, my firebase cloud functions URL will be different in my emulator instance, my development Firebase project (online), and my production Firebase project (online).
On the client side, I would hardcode the URL and change the URL for each invocation upon deployment to match the function HTTP URL for the particular environment I am in. This is unsustainable and tedious. For example, if I had 10 invocations I would have to go through and change the fetch URLS each time I changed environments. If I wanted to test them in a non-prod environment later I would have to change them back. Is there any solution to this, I am using one codebase.
Per Google Cloud docs, eventually, the functions will feature deterministic URLS which means I can programmatically do this in the future using the .env. files but until then I'm not sure how to do this.
TLDR I am trying to make it so that regardless of the environment the client is in it will be able to use the same URL across them to execute the respective function. i.e a DEV client would execute a DEV cloud function that would communicate with DEV servers.