Show pageBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Proxy to Back-end For Development ====== - Create a file call ''proxy.conf.json'' in the root directory of your project. - Fill the config in ''proxy.conf.json'': <code> { "/BACKEND_SERVER_URL/*": { "target": "http://localhost:8080/BACKEND_SERVER_URL/", "secure": false, "logLevel": "debug", "changeOrigin": false, "pathRewrite": { "^/BACKEND_SERVER_URL": "" } , "headers": {"ipaddress":"127.0.0.1"} } } </code> - Start your back-end server. Assume your back-end server url is ''http://localhost:8080/BACKEND_SERVER_URL/'' - Start the front-end with: <code>ng s --base-href /YOUR_BASE_URL/ --deploy-url /BACKEND_SERVER_URL/ --proxy-config proxy.conf.json</code> - Now your front-end http request will automatically redirect by angular from port 4200 to 8080 with the relative back-end url. ng/proxy_to_back-end_for_development.txt Last modified: 2019/01/02 09:56by chongtin