-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
To allow the API to be configured when it's hosted on any server the production code is on, we need to change the configuration at runtime.
Change the configuration class from protected to public and then in AppComponent we can load the url via the window variable
let myApiEndpointUrl = window["myApiEndpointUrl"];
if(myApiEndpointUrl != null) {
this.api.config.rootUrl = myApiEndpointUrl;
}
This means the API will always make calls back to the same server it is running on. It also allows you to deploy to any server (UAT, Testing, Production) and have all calls go to the same server the instance is running on.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels