Run NodeJs on iis TutorialsteemCreated with Sketch.

in nodejs •  7 years ago  (edited)

install :

  1. nodejs - https://nodejs.org/en/download/
  2. iis - https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/installing-iis-8-on-windows-server-2012
  3. iisnode - https://github.com/tjanczuk/iisnode/releases
  4. URL Rewrite - https://www.iis.net/downloads/microsoft/url-rewrite

setup :

  1. add your site to iis and map it to the folder of the website

  2. add web.config file to the folder of the website

    the web.config file will contain:
    <configuration> <system.webServer> <handlers> <add name="iisnode" path="app.js" verb="*" modules="iisnode" /> </handlers> <rewrite> <rules> <rule name="myapp"> <match url="/*" /> <action type="Rewrite" url="app.js" /> </rule> </rules> </rewrite> </system.webServer> </configuration>

if your start nodejs file is not app.js then change it

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

1 more thing is missing , add <iisnode enableXFF="true" /> to <system.webServer> tag