prathyaksh
prathyaksh

Reputation: 21

Can i host/deploy React application in iis server?

I am new to React. I have created a simple React application. I wanted to explore deployment and hosting options for React. I have worked previously in Angular and it can be deployed in IIS. can we do the same for React. Please enlighten me.

Upvotes: 0

Views: 813

Answers (1)

Brando Zhang
Brando Zhang

Reputation: 27997

According to your description, I suggest you could follow below steps to host or publish the application to IIS.

1.Open cmd and locate your react application folder

enter image description here

2.Build the project to production folder.

npm run build

enter image description here

3.Open IIS management console and create a new web sites and use the build path as the physical path. for example: D:\ReactAppTest\my-app\build

Notice: You should pay attention to your port number.

enter image description here

4.Then you could use that port number to access your react application. For example: http://localhost:9965/

enter image description here

Upvotes: 1

Related Questions