I\'m attempting to use Node.js with Socket.IO to faciliate messaging between the browser and client, following the guide.
However, I had to setup Node reverse-proxie
This ended up being a multi-pronged solutions.
First, on the server end of things, I had to set up the endpoints like this
var io = require('socket.io').listen(8080);
var rootSockets = io.of('/nodejs').on('connection', function(socket)
{
// stuff
});
var otherSockets = io.of('nodejs/other').on('connection', function(socket)
{
// stuff
});
Then, on the client-side, to properly connect looks like this
var socket = io.connect(
'http://example.com/nodejs/'
, {resource: 'nodejs/socket.io'}
);
// The usage of .of() is important
socket.of('/nodejs').on( 'event', function(){} );
socket.of('/nodejs/other').on( 'event', function(){} );
After this, it all worked. Remember, on this server Apache is proxying example.com/nodejs to port 8080 internally.