Proxy configuration is a way of diverting specific URLs to a backend server.

Apparently, in this quick Angular 10 proxy tutorial, we learn the easy method to set up Angular CLI to register proxy configuration inside the angular json or CLI configuration file.

Likewise, we don’t require to execute the local server again and again by mentioning the –proxy-config within the Angular command-line interface.

You can use the proxying support in the webpack dev server to divert certain URLs to a backend server, by passing a file to the –proxy-config build option. For example, to divert all calls for http://localhost:4200/api to a server running on http://localhost:3000/api, take the following steps.

#angular #angular 10 #angular.json

Setting Up Angular 10 Proxy Configuration via angular.json
14.70 GEEK