How to config React frontend application completely dev-server proxy?
See original GitHub issueCurrent Behavior
I only have an React frontend application completely, backend API is separated from my frontend application, I hope forwarding interface fetching to backend API such as: forward /api to http://domain3.domain2.com/path/api, but I can’t find any solution to solve this?
Expected Behavior
forwarding interface fetching to backend API
Steps to Reproduce
$ yarn start nx-demo
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
React — How To Proxy To Backend Server - Medium
Let's start the server with this command npm run dev and test this API on port 3080.
Read more >Proxying API Requests in Development - Create React App
Configuring the Proxy Manually ... Note: this feature is available with react-scripts@2.0.0 and higher. If the proxy option is not flexible ...
Read more >Why You Should Use React DevServer Proxy - Bits and Pieces
There are two main ways to set up DevServer Proxy for a React frontend. You can choose either one based on what you...
Read more >Why you should use a proxy server with Create React App
Learn why and how to implement a proxy server with Create React App to secure and organize your next React app.
Read more >Using the proxy setting for React dev server | protips
Quite simply - if you request something that is not in your React application (unknown resources), the React Development server will forward the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
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
Hi there, this is already available. 😃
In your project’s
serve
configuration you can add:And such file looks like the following:
Does anyone have a work around for this? Kinda important for my builds to use the production api url