1
votes

I got a node.js express application and i need to make it run on my local IIS server so i can send valid http requests to it and work with the responses.

I am using win 10 and IIS 10.

I followed the different guides about working with iisnode in order to use node.js application on IIS.

https://github.com/tjanczuk/iisnode

I also managed to run the tests, so the iisnode is installed, valid and is working together with my IIS.

The "built-in" test is being executed under the default web site which comes with IIS, it creates a new application under it from which there is a working access to the different examples.

My problem is that i am still lacking some information about how to setup my own node.js app on IIS since this information seems to be lacking. And later on how to overcome issues with invalid http requests.

HTTP status: 500
HTTP subStatus: 1001
HTTP reason: Internal Server Error
2

2 Answers

7
votes

I would advice to follow the next guide,

https://harveywilliams.net/blog/installing-iisnode

combined with the official github page of iisnode, it has all the details about making a simple express node.js app working from scratch with iisnode on IIS.

I would advice to test each part before moving on to the next and once done testing to start first from a minimalistic and simple app of your own and once everything is working build it up from there.

P.S. The reason for this error for me was bad naming when i used express.routing

1
votes

step 1 :- Install Node js

step 2 :- Install IISNode :- from here

then root folder structure like below. iisnode folder contains log file and index file.

enter image description here

step 3 :- create angular server side build so it will creates browser and server folder. add them in dist folder as shown in below.

enter image description here