Azure Websites and io.js
Multiple people have asked me whether Azure Websites supports io.js, so let's get down to the nitty-gritty: It does - and I wrote a small deployment script that does all the work for you.
Upon deployment of an app, Azure Websites runs all kinds of small commands to ensure that everything is working properly. I modified the script to automatically download io.js and set it as the default Node binary on your website.
You can find the necessary files on GitHub - simply include .deployment, deploy.cmd and iisnode.yml in your project. Done!
Deploying a custom version of io.js
If you don't want to use the deployment script or want to use a specific version of io.js, you can use good old manual labor. Basically, you need to upload iojs.exe
and tell Azure to use said file.
First, download the latest version of io.js and make it part of your app - you could for instance create a bin/iojs
folder. Next, create or edit your iisnode.yml
file by adding the following:
nodeProcessCommandLine: "D:\home\site\wwwroot\bin\iojs\iojs.exe" --harmony
It's pretty likely that you're interested in io.js because of it's ES6 support. While stable ES6 features are enabled by default, you'll still have to provide the harmony
flag for those neat almost-ready features.