Created
March 17, 2015 03:16
-
-
Save dimavs/ab540cc78b689c2727aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- vim: set ts=2 et sw=2 sts=2: --> | |
<configuration> | |
<system.web> | |
<customErrors mode="off" /> | |
</system.web> | |
<system.webServer> | |
<httpErrors existingResponse="PassThrough" /> | |
<!-- nodejs entry point --> | |
<handlers> | |
<add name="iisnode" path="server.js" verb="*" modules="iisnode" /> | |
</handlers> | |
<defaultDocument> | |
<files> | |
<add value="server.js" /> | |
</files> | |
</defaultDocument> | |
<!-- iisnode config parameters --> | |
<iisnode | |
nodeProcessCommandLine=""%programfiles%\nodejs\node.exe"" | |
watchedFiles="*.js" | |
enableXFF="true" | |
/> | |
<!-- rewrite url for expressjs --> | |
<rewrite> | |
<rules> | |
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true"> | |
<match url="iisnode" /> | |
</rule> | |
<rule name="StaticContent" stopProcessing="true"> | |
<match url="\.(?:jpg|jpeg|css|png|js|ico|html)$" /> | |
<action type="Rewrite" url="public{REQUEST_URI}" logRewrittenUrl="true" /> | |
</rule> | |
<rule name="DynamicContent"> | |
<action type="Rewrite" url="server.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