cli
cli copied to clipboard
Ability to access production API base URL as environment variable
Describe the solution you'd like Ability to access the base URL of the API so it can be used in code without having to set it after deployment.
Why is this needed? What challenge will it help you solve? Please describe. It would also be useful to set a base url environment variable for deployments, so we can reference it in application code without needing to set it.
see https://github.com/nitrictech/cli/issues/187#issuecomment-1072048868
This is an interesting one as there is a cyclic dependency for deployment. As in you need to deploy the functions to wire up the gateway, but then you can only deploy the functions if the gateway is already deployed?
Are there other methods we could recommend here, like using headers? e.g. Host (This also applies if you have a single function connected to two different gateways).
Gateway urls can now be accessed at runtime using the Details
API for resources.