0

In the React project, I used proxy in package.json to route the traffic of backend api calls to the backend server address.enter image description here. And in the project, I used axios to send requests such as: enter image description here I do not have to add any prefix in the request of axios api calls. However, what should I config in the Nginx after I running npm run build in the nginx.conf?

Here is the nginx config file, in which I have already defined a "/" proxyenter image description here What should I write to route the traffic of api calls in the production environment?

0 Answers0