There are two ways to do this. The easiest way is through IIS 7 Manager. You can use this Knowledge Base article for details on how to connect to our web server with IIS 7 Manager.
Once connected, go to the “Handler Mapping” module. Click on “Add Module Mapping.
Enter the settings as you see them. Now you have your application set to push all *.js files to Node.js.
You do not have to use IIS 7 Manager to create this mapping. You can directly code it within your application’s web.config file. What you will need to look for is the ‘system.webserver’ element within the configuration of the web.config file and add the handler line:
<configuration> <system.webServer> <handlers> <add name="iisnode" path="*.js" verb="*" modules="iisnode" /> </handlers> </system.webServer> </configuration>
There are a couple of work-arounds to this:
1. Upload the .js file you want to be processed by node.js to its own subfolder. Then add the web.config setting to that folder.
2. You can specify which .js file gets processed by the node.js engine. In the path field, rather than implementing a wild card, you can set: path=”somefile.js”.