Proxy not working when running ng serve
See original GitHub issueOS?
Mac OSX (Sierra)
Versions.
@angular/cli: 1.0.0-beta.31 node --version v6.9.1
Repro steps.
Need to run a proxy so I added --proxy-config proxy.conf.json in package.json
This works if I run npm start but then I cant access the site from my mobile on the same network.
If I run ng serve then I can use my mobile to test the site but the proxy stopps working… ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:24 (4 by maintainers)
Top Results From Across the Web
Angular-CLI proxy to backend doesn't work - Stack Overflow
Angular 4 running localhost: http://localhost:4200/. In package.json. "start": "ng serve --proxy-config proxy.config.json",.
Read more >Angular proxy to backend is not working - Morioh
Angular uses webpack dev server to serve the app in development mode. If we look at the following diagram, app UI is running...
Read more >Use a Proxy with the Angular CLI to Fix CORS ... - Sam Julien
When we first try to use a local server in development, we get a rude CORS error in the console and nothing works....
Read more >How to resolve CORS errors by using Angular Proxy?
“ logLevel" is used to check whether proxy is working or not. ... Finally, you have to restart your project with the ng...
Read more >Angular CLI Proxy Settings for API Calls | by GID Master
Keep in mind that Angular CLI uses this setting during development stage only, it means that the proxy configuration works when running the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Did you try
?
@kultigin trying add the below to avoid ECONNRESET error { “/emport-api/*”: { “target”: “http://localhost:8080”, “secure”: false, “logLevel”: “debug”, “changeOrigin”: true, “headers”: { “Connection”: “keep-alive” } } }