0

セットアップの何が問題になっていますか? エクスプレスを使用することを念頭に置いています。

web.config ファイル:

<handlers>
  <add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>

<rewrite>
  <rules>
    <rule name="myapp">
      <match url="/*" />
      <action type="Rewrite" url="app.js" />
    </rule>
  </rules>
</rewrite>

app.js は以下のとおりです。

var express = require('express');
var app = express();
var server = http.createServer(app).listen(process.env.port);

app.use(express.static(__dirname + '/pro/Public'));

app.get('/pro',function(req,res) {
 res.sendfile(__dirname + '/yoyo.html');
 res.end;
});

html には次のような従来のレイアウトがあります。

<link rel="stylesheet" type="text/css" href="cssKtelVolouOsm.css">
<script type="text/javascript" src="javascriptKtelVolouOsm.js"></script>

次のエラーが表示されます。

Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost/cssKtelVolouOsm.css 


Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost/javascriptKtelVolouOsm.js 
4

1 に答える 1