Search code examples
node.jsiisiisnode

Use multiple node versions with iisnode


I am using iisnode. On the same server I need to run different versions of node for different websites. I have nvm installed on the server. How do I tell iisnode which version of node I want to start for each site?


Solution

  • You need to add a nodeProcessCommandLine entry to web.config that points to the specific node.exe file you want to use:

    <configuration>
        ...
        <system.webServer>
            ...
            <iisnode  nodeProcessCommandLine="C:\Users\Administrator\AppData\Roaming\nvm\v6.9.2\node.exe"  />
        </system.webServer>
    </configuration>