Skip to content

Instantly share code, notes, and snippets.

@smurfpandey
Forked from Blackmist/gist:6701556
Last active March 18, 2017 02:23
Show Gist options
  • Save smurfpandey/3624a89ef135daa558c5 to your computer and use it in GitHub Desktop.
Save smurfpandey/3624a89ef135daa558c5 to your computer and use it in GitHub Desktop.
web.config for running node.js applications inside IIS with IISNode
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>
<iisnode node_env="production" />
<rewrite>
<rules>
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
<match url="iisnode" />
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True" />
</conditions>
<action type="Rewrite" url="index.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment