这是我在 Windows 7 上的操作方式。
部分说明在这里。其他人可以在这里找到。
安装软件
1)安装node-v0.10.26-x64
2) Installed iisnode-full-iis7-v0.2.2-x64
3) Ran setupsamples.bat inside C:\Program Files\iisnode
Setup Directory
4) Removed everything inside C:\Program Files\iisnode\www
5) Extracted ghost-0.7.1 inside C:\Program Files\iisnode\www
Install Node Modules
6) Ran Node.js command prompt as administrator
7) Typed c:
8) Typed cd C:\Program Files\iisnode\www
9) "npm install --production" | command to install npm
10) Sqlite3 didn't install so had to run "npm install https://github.com/mapbox/node-sqlite3/tarball/master" to install it
Configure
11) Had to install url rewrite
12) Altered C:\Program Files\iisnode\www\config.js under development
url: 'http://localhost/blog',
port: process.env.PORT
13) still on the node.js command prompt inside C:\Program Files\iisnode\www typed "node.exe index.js" to run it
14) Removed node from iis and added application blog and pointed it to my dir C:\Program Files\iisnode\www
15) Added the web.config inside C:\Program Files\iisnode\www
<configuration>
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
<add name="WebDAV" path="*" verb="" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" />
</handlers>
<defaultDocument enabled="true">
<files>
<add value="index.js" />
</files>
</defaultDocument>
<rewrite>
<rules>
<rule name="Ghost">
<match url="/*" />
<conditions>
<add input="{PATH_INFO}" pattern=".+\.js\/debug\/?" negate="true" />
</conditions>
<action type="Rewrite" url="index.js" />
</rule>
</rules>
</rewrite>
<!--
See https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config for information regarding iisnode specific configuration options.
-->
<iisnode node_env="%node_env%" loggingEnabled="false" debuggingEnabled="false" devErrorsEnabled="false" />
</system.webServer>
</configuration>