IT:AD:Node.JS:HowTo:Install IISNode Module
- See also:
Summary
Use IISNode to install Node.JS in IIS.
Process
Prerequisites
* Ensure Url-Rewrite extension to IIS is installed: http://www.iis.net/downloads/microsoft/url-rewrite
IISNode Installer
I found the install rather rough. Not exactly sure why it started working …
THe current IISNode no longer does the mistake that it used to – namely that the the 64bit installer would look for node.js in the 64 bit path. It's no longer necessary, but know that the fix for that was to copy the whole c:\Program Files\NodeJS folder to the c:\Program Files (x64)\NodeJS folder. Then the installer would work.
- Download x64 package of IISNode.
- Install, but note that 20121022 ran into this error, where it was looking for 32bit version of Node.JS:
The first part of the work around (discussed in this thread is to copy the Node.js files to the target dir to fool the installer)
Then have to read here regarding setting nodeProcessCommandLine to point to real direction.
IISNode Module
IISNode Default Web Site/Node samples website
Proceed with setting up samples, from the command prompt (in admin mode) call %programfiles%\iisnode\setupsamples.bat
Check that the website was created:
then go check that http://localhost/node exists
Samples
TroubleShooting
The first time I navigated to the samples website, from the server itself, I got:
Ah. Yes. Newly created sample app in an site I usually shut down. Simple enough to fix:
Samples Index
Hello World
Navigating to the fist sample I got:
but then I got:
The error message simply leads to understanding that the web.config of the application has a web.config section to play with that gives a means to configure the IIS Module to know where to find node.js
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="hello.js" verb="*" modules="iisnode" />
</handlers>
<iisnode
...
nodeProcessCommandLine=""%programfiles%\nodejs\node.exe""
interceptor=""%programfiles%\iisnode\interceptor.js""
...
/>
</system.webServer>
</configuration>
But…unfortunately for me, it's right. It's pointing to:
Uninstall/Reinstall/Restart Server
Resources
* Good early stuff: http://weblogs.asp.net/jgalloway/archive/2011/10/26/using-node-js-in-an-asp-net-mvc-application-with-iisnode.aspx * http://www.hanselman.com/blog/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx
- Hum….not so hot at handling requests….(2.5 secs slower than IIS itself…)












