In order to avoid having to rebuild my app every time I need to deploy it on a different server with a different API address, I currently store the API base address in my environment class which gets included in the bundles after build. However, this makes it difficult to change the API address without rebuilding the entire app, which is quite time-consuming.
My app is large and time-consuming to build, so I am looking for a way to dynamically update the API address without having to go through the entire build process. Here's an example of how I currently have it set up in my environment.prod.ts file:
export const environment = {
production: true,
configName: 'prod',
baseUrl: 'https://mpisitweb1/api'
};