服务器没有find任何匹配请求的URI节点的东西

我在VS2015中有下面的文件夹结构:

节点网络应用的文件夹结构

server.js有以下代码:

var express = require('express') var app = express(); var http = require('http').Server(app); var path = require('path'); var port = process.env.port || 1337; app.use(express.static(__dirname + 'client')); app.get('/', function (req, res) { res.sendFile(path.join(__dirname,'client', 'HTML1.html')); }); http.listen(port, function () { console.log(`listning on ${port}`); }) 

和Html1.Html有以下代码:

 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head data-ng-app="imageLoaderApp"> <meta charset="utf-8" /> <title></title> </head> <body> <div> </div> <script src="/client/scripts/angular.js"></script> <script type="text/javascript"> var app = angular.module('imageLoaderApp', []); app.controller('loadController', function ($scope) { console.log(`i'm here.'`); }); </script> </body> </html> 

当我在浏览器中的URL下面

HTTP://本地主机:1337 /

在控制台中出现错误:

在这里输入图像说明

所有的js文件都发生这种情况。 我甚至试图移动主文件夹中的html和js文件仍然得到相同的错误。

我究竟做错了什么?

它看起来像HTML1.html在客户端文件夹中。 如果是这种情况,我认为你需要把path相对于它的js:'src =“scripts / angular.js”'