Stuff we're figuring out as we explore node.js.
Hosting on Windows Server 2k8 R2 w/o IIS
This is the easy way to get a website built on node.js up and running on a Windows machine. To use IIS, see the instructions below (tbd) (to save your sanity, make sure the IIS role is turned off on the server).
Basically, since node.js on Windows runs as a single .exe, you just need to create a service that will host the .exe and run your site.
This isn't as easy as it should be using built-in Windows tools, which is why we use NSSM - the Non-Sucking Service Manager.
- Install NSSM.
- Crank up the NSSM Gui
- Choose the node .exe
- For the command-line argument put the path to your node.js app (server.js)
- Give it a name (this will show up in the Services Manager)
- Click Ok
(This can also be done via the command line if you wish to script it)
That's it. You now have a service installed in the services manager for your app. Go to the Services MMC console and start the service. Your node app will now run in the background, restart if it stops for some reason, and start automatically if the system reboots itself.
Hosting using IIS
Express.js - Defacto standard, needs no introduction...
Locomotive.js - Interesting b/c it's a *VC framework. With Locomotive you choose your ODM. Think Rails w/o Active Record, or MVC3 w/o EF.
Railway.js - Rails on node.js. 'nuff said.
Flatiron.js - Haven't wrapped my head around this yet, but it's part of a larger suite of tools primarily supported by the nodejitsu folks.
Node's version of ERB. Ugly but familiar..
Node's version of HAML, only better.