服务器未找到与请求的URI节点匹配的任何内容

时间:2016-10-26 18:14:14

标签: node.js express

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

Folder structure for Node web app

server.js的代码如下:

<!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>

和Html1.Html的代码如下:

\/checkout\/confirmation\/[0-9]{3,}

当我在浏览器中点击url时

http://localhost:1337/

我在控制台中遇到错误:

enter image description here

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

我做错了什么?

1 个答案:

答案 0 :(得分:2)

看起来HTML1.html位于客户端文件夹中。如果是这种情况,我认为您需要将路径放到相对于它的js上:&#39; src =&#34; scripts / angular.js&#34;&#39;

相关问题