I have run ng build --prod
and copied the contents of /dist
folder inside webapps folder of a dynamic web project.
I then try to export this project as a .war
file and deploy it on Liberty server. The challenge is, I have set API URLs inside environment.prod.ts
.
So in case I need to change the API URL, I need to re-run ng build
and copy contents of /dist
and then export as .war
.
I have tried setting the the API Base URL to window.location.origin
since the base URL will be same for our Angular app and Microservices.
What we want is to instead make the API URL configurable from outside. For example, we have created the final .war file, but when we deploy it as a container on docker, we read some config file and set it as API URL.