0

Getting started with angular. Background: The docs go through setting up proxy.conf.json and using that to route calls. As far as I have read, the command line ng serve --proxyConfig=proxyConfig starts the web pack server, passes the proxy configuration to webpack.

My question:
Suppose we finish development, and need to deploy the web control to, e.g. Apache Tomcat. I've found instructions on deploying the control there and can see the control come up in the browser, but how do we transfer the configuration from proxy.conf.json to a deployment server, e.g. tomcat? I'm assuming that there is no provision in angular to translate to a different server? Thanks!

dt170
  • 308
  • 1
  • 11
  • I think I can refine my question, based on this: https://stackoverflow.com/questions/37172928/angular-cli-server-how-to-proxy-api-requests-to-another-server The example, they must have some code in their angular control like getData("/api"). The string "/api" is hard coded. They first use proxy.conf.json to route that call to a web server, maybe a test server. But when they deploy the control to a production server and there is no proxy.conf.json, how do they handle routing "/api" to "???"? – Fahrvergnugen Jan 28 '22 at 20:22

0 Answers0