2

I have developed an application using nodejs & react. I want to host my application using the same Port: 3000 on IIS server?

1
  • 1
    Is your issue solved? If your issue is solved then I request you to mark the helpful suggestion as an answer. This will help other people who face the same issue. If your issue still exists then try to refer the solution given by the community members. If then also you have any further questions then let us know about it. We will try to provide further suggestions to solve the issue. Thanks for your understanding. Commented Oct 14, 2019 at 5:54

2 Answers 2

1

I would just comment, but my reputation is a little low.

The best option for you would be to run IISNode. Supported by MS and available on Github here: https://github.com/Azure/iisnode.

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

Comments

0

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.

https://learn.microsoft.com/en-us/iis/install/installing-iis-85/installing-iis-85-on-windows-server-2012-r2

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 the 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:

enter image description here

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 the site path.

enter image description here

Open site by click on the browse button from the action pane.

enter image description here

enter image description here

Comments

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.