socket.io – can’t get it to work, having 404’s on some kind of polling call

It looks like Socket.IO can’t intercept requests starting with /socket.io/. This is because in your case the listener is app — an Express handler. You have to make http be listener, so that Socket.IO will have access to request handling.

Try to replace

app.set( "ipaddr", "127.0.0.1" );
app.set( "port", 8080 );

with

http.listen(8080, "127.0.0.1");

See docs for details: http://socket.io/docs/#using-with-express-3/4

Leave a Comment