NodeJS server, res.sendfile returning HTML but not the "jscript includes" (<script src>)
You need to include a static file serving middleware at the top of your stack:
var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
app.use(express.static(__dirname + '/public'));
app.get('/', function(req, res){
res.sendfile('index.html');
});
// ...
So if you put your js files in a subdirectory named 'public' (relative to where the script is), the browser should be able to access the javascript files.