Install as IISAPI application

Tested on Windows Server 2022 Datacenter and IIS 10 but should likely work on other versions.

  1. Make sure IIS is added to the server roles
  2. Install Node.js https://nodejs.org/
  3. Install IIS ARR https://www.iis.net/downloads/microsoft/application-request-routing
  4. Install IIS URL Rewrite https://www.iis.net/downloads/microsoft/url-rewrite
  5. Install IIS iisnode https://github.com/Azure/iisnode

web.config

To make a web site hosted by iisnode and OneDoor server two things are needed:

  1. Place folder onedoor-server with application content in an IIS web site directory
  2. Create a special purpose web.config in the web site directory Example:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
	      <iisnode
            nodeProcessCommandLine="C:\Program Files\nodejs\node.exe"
            loggingEnabled="true"
            promoteServerVars="LOGON_USER"
        />
        <handlers>
            <add name="iisnode" path="onedoor-server/index.cjs" verb="*" modules="iisnode" />
        </handlers>
<rewrite>
       <rules>
         <rule name="onedoor-server">
           <match url="/*" />
           <action type="Rewrite" url="onedoor-server/index.cjs" />
         </rule>
       </rules>
     </rewrite>
    </system.webServer>
</configuration>

NOTE: To allow handlers section it might be needed to unlock configuration section system.webServer/handlers in IIS configuration editor at server level.