Server2012+IIS8中配置NodeJS运行环境,安装完nodejs和iisnode之后,出现一个报错,如下:
Theiisnodemoduleisunabletostartthenode.exeprocess.Makesurethenode.exeexecutableisavailableatthelocationspecifiedinthesystem.webServer/iisnode/@nodeProcessCommandLineelementofweb.config.Bydefaultnode.exeisexpectedinoneofthedirectorieslistedinthePATHenvironmentvariable
参考文章:https://admin-ahead.com/forum/websitepanel/node-js-error!/
解决方法:在web.config》system.webServer节点加上:
<iisnodewatchedFiles="*.js;node_modules\*;routes\*.js;views\*.jade"nodeProcessCommandLine="C:\ProgramFiles\node.exe"/>
问题解决,希望能帮助到后面遇到此问题的童靴,我的web.config文件如下,供参考: