read

In my last few posts I introduced the iisnode project and talked about specific aspects of hosting node.js applications in IIS 7.x on Windows:

Hosting node.js applications in IIS on Windows
Integration with the URL rewrite module
Running node.js express applications

In this article I am showing how to use the WebMatrix development environment to develop node.js applications and test them in IIS Express using the same iisnode module. WebMatrix is a free, lightweight, Windows based development environment for web application development using a variety of web technologies.

Setting it up

First you need to download and install WebMatrix (free). The download will also include IIS Express, a lightweight version of IIS specifically designed for development purposes.

Next you need to download a recent x86 build of iisnode. Unzip it somewhere on disk.

Note if you are running 64 bit Windows, you still need to download the x86 build of iisnode, since IIS Express only ships in 32 bit version. 

Now install iisnode by calling the installation script from the command line with administrative privileges:

On a 32 bit Windows system:

1
     install_iisexpress.bat

On a 64 bit Windows system:

1
%systemroot%\syswow64\cmd.exe /C install_iisexpress.bat

If everything goes well, you should see successful installation confirmation:

image

Take note of the samples directory to use it from WebMatrix in the next step.

Start up WebMatrix

Start up WebMatrix. When prompted, choose “Site from folder”:

image

Enter the samples path that was shown in the last step of iisnode installation:

image

You can now explore and modify all node.js samples that came with iisnode installation in WebMatrix:

image

Right click on index.htm and choose “Launch in browser”. IIS Express will host the samples web site and you will be able to access the node.js sample endpoints exposed from IIS Express:

image

What did just happen?

WebMatrix with IIS Express gives you a lightweight, free development stack for node.js applications on Windows. IIS Express allows you to exercise the same set of features iisnode exposes in a regular IIS installation, including URL rewriting module.

So where can I get iisnode again?

Everything you need to get started is at https://github.com/tjanczuk/iisnode. Make sure to check out the samples. Feedback welcome!

Blog Logo

Tomasz Janczuk


Published

Image

Tomek on Software

Software - shaken, not stirred

Back to Overview