Externalize the back-end Api's URL for an Angular 8 App

1/30/2020

I'm working in deploying an App (Angular8 - SpringBoot - MongoDB) on a Google Cloud Platform Kubernetes Engine. I'm looking to externalize the SpringBoot Api's URL for the Angular app. I want to pass it at the run time as I'm doing already for the DB's URL in SpringBoot API (by passing it as an env var in the docker File). Locally I hard coded the URL into the HTTP service for testing. The only solution I found is by using by using the file environment.ts but another time it's hard coded, you need to know the server IP before deploying it. Is there any solution for that?

-- Achraf
angular8
docker
environment-variables
kubernetes

0 Answers