私は Sails.js と node.js を初めて使用するので、質問は些細なことかもしれませんが、答えが見つかりませんでした。node.js アプリを IIS の Web サイトにデプロイしたので、アプリには でアクセスできますhttp://example.com/myapp/
。を参照すると、 sail.jss が のような URL を探しているため、http://myhost.com/myapp/app.js
http ステータスが表示されますが、このファイルは実際には にあります。このフォルダーは、フレームワークによってその場で作成されるようです。404 (Not found)
http://myhost.com/images/logo.png
http://myhost.com/myapp/.tmp/public/images/logo.png
.tmp
誰かがこれに光を当てることができますか?
[編集]
web.config に書き換えルールを追加したところ、はるかにうまく機能します。ただし、アプリケーションを Web サイトのルート ( http://myhost.com/にアクセス)に配置した場合にのみ機能します。アプリケーションを下位レベル ( http://myhost.com/myAppからアクセス) に配置すると、追加されたルールは何の効果ももたらさないようです。
ここにweb.configがあります:
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="StaticContent">
<action type="Rewrite" url="assets{REQUEST_URI}"/>
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
</conditions>
<action type="Rewrite" url="app.js"/>
</rule>
</rules>
</rewrite>