i am trying to upload react.js app on cloud which have windows os installed . How can i upload and start my react app Using windows IIS.
1 Answer
First, you need to install the node on the windows:
https://nodejs.org/en/download/
install IIS by following these steps:
- Open control panel
- select Programs and Features, click on the link Turn Windows features on or off.
- Click on the Internet Information Services checkbox and select iis required features.
- open the iis manager from the installed application.
after installing node and iis open command prompt as administrator and enter to the react js application folder.
example:
my react js application is under the C:\windows\system32\
to go to that path use command:
cd C:\windows\system32\my-app
run react app using :
npm start
check that application is running properly or not.
then run the command:
npm run build
You can see the build folder in your application folder.
- now open iis manager.
- select server name from the connection pane.right-click on it and select add-website:

- in add website windows enter details like: site name folder path the port number, IP address, hostname, etc
note: select the build folder when you add site path.
- Open site by click on the browse button from the action pane.
4 Comments
JHM16
cool it worked . but now react routing not working only first page page is visible and if i tried to access other routes it shows error. can you please tell me why so .
Jalpa Panchal
From your post, I can see that your issue in the original post is solved now. I request you to mark the helpful suggestion as an answer and create a new question in the new post for the SEO purpose .it is different from the parent question. Thank you for understanding.
Kwame
npm add react-router-dom see alex.domenici.net/archive/…
NoobCoder
What if we are running Angular application inside Node.js. How we will host Node.js in that case so that it can run both ?


