我正在尝试使用Node.js服务器创建az ExtJS应用程序.我的服务器代码目前看起来像这样:
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.sendfile(filedir + '/index.html');
});
app.get('/employees', function(req, res){
console.log("hello");
});
app.listen(3000);
Run Code Online (Sandbox Code Playgroud)
当我在浏览器中打开localhost:3000时,html文件加载,但不正确.检查firebug我看到它找不到html中的链接文件.例如
"NetworkError: 404 Not Found - http://localhost:3000/ext-4/ext-debug.js".
Run Code Online (Sandbox Code Playgroud)
这是非常合乎逻辑的,因为该URL上不存在该文件.我的问题是如何解决这个问题,所以它可以找到我的文件系统上的每个链接文件.
我显然做错了什么或遗漏了什么,我在节点上是全新的.