Node.js Sails.js iisnode配置
我想知道是否有人可以帮助在Windows上的IIS7中运行sails JavaScript应用程序 没有证明对我有帮助 我已完成并将其创建为我的web.config文件:Node.js Sails.js iisnode配置,node.js,sails.js,iisnode,Node.js,Sails.js,Iisnode,我想知道是否有人可以帮助在Windows上的IIS7中运行sails JavaScript应用程序 没有证明对我有帮助 我已完成并将其创建为我的web.config文件: <configuration> <system.webServer> <!-- Tell IIS to use the iisnode module to run your application --> <handlers> &
<configuration>
<system.webServer>
<!-- Tell IIS to use the iisnode module to run your
application -->
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>
<!-- Add iisnode with the @nodeProcessCommand line if
you see the error: Make sure the node.exe executable
is available at the location specified in the
system.webServer/iisnode/@nodeProcessCommandLine element
of web.config. -->
<iisnode
nodeProcessCommandLine="%ProgramFiles%\nodejs\node.exe"
/>
<!-- Since behind the covers, Sails.js is just an express app
rewrite all urls to processed by iisnode via app.js. This
will sort out things like the routing to your public
resources (images, js, styles) and all configured rest
endpoints. -->
<rewrite>
<rules>
<rule name="root">
<match url=".*" />
<action type="Rewrite" url="app.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
,但当我尝试通过IIS端口8090访问它时,我收到一个HTTP 500,其中包含以下消息:
要使用node app.js
运行应用程序,通常需要在与应用程序相同的目录中安装sails
。
为此,请运行npm安装sails
或者,如果您在全球范围内安装了sails(即您安装了npm-g sails
),则可以使用sails lift
。
当您运行sails lift
时,您的应用程序仍将使用本地/node\u模块/sails
依赖项(如果存在),
但如果它没有,应用程序将运行全球帆代替
代表发布评论;你能解决它吗?面对同样的问题。因为我的名声不好,所以我无法发表评论。我最终决定不使用iisnode。使用单独的sails应用程序,并拥有一个IIS站点,该站点具有对sails应用程序的入站重写规则。用于windows身份验证的NodeSPI。代表发布评论;你能解决它吗?面对同样的问题。因为我的名声不好,所以我无法发表评论。我最终决定不使用iisnode。使用单独的sails应用程序,并拥有一个IIS站点,该站点具有对sails应用程序的入站重写规则。用于windows身份验证的NodeSPI。