0

I would like to deploy my react app to IIS and I tried a step by step guide.

I already tried a create-react-app and I already added a new website but when I run It says:

this site can't reach

.

I tried that way but some steps are not understood.=>create-react-app on IIS 10

I am newbie and May I know step by step if possible.

Thanks.

1

1 Answer 1

3

I suggest you could try belwo steps to host a reasct app on the IIS.

If you don't have the react app, I suggest you could install the npm and generate a react app for testing.

1.Open cmd and locate a folder by using cd yourfoldername

enter image description here

2.Run below command to add the package

npm i -g create-react-app

3.Run below command to create the react app in the folder, wait for creating the application

create-react-app my-app

enter image description here

  1. Build the project to production folder.

    npm run build

enter image description here

5.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

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

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I already tried this way on yesterday and its worked. So I will mark as the answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.