DEV Community 👩‍💻👨‍💻

Discussion on: How to deploy React Application on IIS Server

sumitkharche profile image
Sumit Kharche Author • Edited on

The proxy feature isn't meant for production. Proxy is most suitable in the Development environment but when you deploy your app with prod mode on a web server then you need to do it in different ways.
Few links for your references:

One way you can do it by using the environment variables.

so for development create file .env.development outside of src folder and add your API URL like:

REACT_APP_API_BASE_URL='<your local api url>'

For Production create file .env outside of src folder & add your Prod api base url like above.

once you configure your API URLs you can simply use it in your as App as below:


I hope this solves your problem. Please let me know if any queries.

jadhavaa1994 profile image

I have created a web app with frontend React and nodejs backend.
I want to host web app on windows IIS web server.
In IIS Prdouction env.Application working fine but react app failes to connect with backed nodejs.
In vs code development environment it's working fine but on production iis server not working.
How do I resolve this issue?
Showing Error
Request Method: POST
Status Code: 404 Not Found