I am trying to make az an ExtJS application with a Node.js server. Currently, the server code is as follows:
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);
When I open localhost: 3000 in a browser, the html file loads, but not correctly. Validation in firebug I see that it cannot find related files in html. for instance
"NetworkError: 404 Not Found - http://localhost:3000/ext-4/ext-debug.js".
This is pretty logical since the file does not exist at this url. My question is how to fix this problem so that it can find every single related file in my file system.
I'm obviously doing something wrong or something is missing, I'm brand new to Node.
Thanks, advanced!
source share