Run NodeJs on iis TutorialsteemCreated with Sketch.

in #nodejs7 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

Sort:  

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

Coin Marketplace

STEEM 0.26
TRX 0.20
JST 0.038
BTC 96315.76
ETH 3565.22
USDT 1.00
SBD 3.90