Answer the question
In order to leave comments, you need to log in
How to set up a proxy on the backend server on the angular 2 cli?
after ng serve, the localhost:4000 server is started, it is necessary that when accessing localhost:4000/api or another port, the request goes to my local openserver to a domain, for example, test.ru. How to set up proxying tell me?
Answer the question
In order to leave comments, you need to log in
Create proxy.conf.json file
{
"/api": {
"target": "http://localhost:3000",
"secure": false
}
}
npm start
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question