I want to proxy a specific url to another server. I followed the instructions here https://github.com/angular/angular-cli#proxy-to-backend
So to test things out I started to angular 2 application, one on port 4200 and one on 4201.
My proxy.config.json :
{
"/auth": {
"target": "http://localhost:4201",
"secure": false
}
}
Result:
- If I stop the server running on 4201 I get an error.
Error occured while trying to proxy to: localhost:4200/auth
- If the server is running I still get the page from localhost:4200
What I expect:
- having the page from 4201 returned.