[英]How To Build a web.config for a react app using azure + IISNode + express
[英]Set rule in web.config for Express in iisnode
iisnode中提供的示例僅處理單個文件(例如hello.js),它們在web.config
文件中設置規則,如下所示:
<!-- indicates that the hello.js file is a node.js application
to be handled by the iisnode module -->
<handlers>
<add name="iisnode" path="hello.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="myapp">
<match url="myapp/*" />
<action type="Rewrite" url="hello.js" />
</rule>
</rules>
</rewrite>
在處理普通快遞應用程序時,我們應使用bin/www
作為默認啟動名。
我目前只是將hello.js
替換為bin/www
,這是正確的方法嗎?
要使用重寫規則在IISNode中運行Express應用程序,只需為Express應用程序指定您的主文件即可。 無需分配bin/www
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.