Skip to content

Instantly share code, notes, and snippets.

@nivesh2
Last active December 21, 2015 07:09
Show Gist options
  • Save nivesh2/6269315 to your computer and use it in GitHub Desktop.
Save nivesh2/6269315 to your computer and use it in GitHub Desktop.
Node.js Web.config file required for rendering json and other static content when hosted in Azure
<configuration>
<system.webServer>
<!-- indicates that the server.js file is a node.js application
to be handled by the iisnode module -->
<handlers>
<add name="iisnode" path="server.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
</conditions>
<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