Skip to content

Instantly share code, notes, and snippets.

@Blackmist
Created September 25, 2013 15:41
Show Gist options
  • Save Blackmist/6701556 to your computer and use it in GitHub Desktop.
Save Blackmist/6701556 to your computer and use it in GitHub Desktop.
web.config for iisnode and ghost
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>
<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>
@smurfpandey
Copy link

You will also need to set the node_env variable otherwise the site will run in development mode.

<iisnode node_env="production" />

Adding this inside <system.webServer> will set the enviroment as production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment