Accepted answer

I am betting the actual response contains the content of your test_socket.html. The problem is that there is no exception rule for loading the javascript file, the server always responds to requests by sending test_socket.html. The javscript file works, however, because itself intercepts this request and serves the socketio.js file (look in your console, it should say "served static content" or something along those lines)

I find that it is a lot easier to let a prebuilt framework deal with these kind of issues. Take a look at It's the tutorial that I used to get started, which introduces you into node.js, npm, express, jade and Should get you started on building your first Web 2.0 app quite nicely!

Related Query

More Query from same tag