在Windows 10 IIS上安装iisnode
目标是将node.js集成到IIS中,本文假设你已经安装好了IIS、node.js、URL rewrite module for IIS和https://github.com/Azure/iisnode/releases (0.2.26 full)。
- 以管理员身份administrative打开一个cmd窗口
- cd %ProgramFiles%\iisnode
- setupsamples.bat
- notepad %WINDIR%\System32\inetsrv\config\applicationHost.config
- 找到</configuration>标签,在它前面增加如下内容
<location path="Default Web Site/node" overrideMode="Allow">
<system.webServer>
<handlers/>
</system.webServer>
</location>
- Restart IIS
- 访问http://localhost/node/
- 点击其中的helloworld链接,没有问题就OK了