I have been able to successfully run this a few months ago but I am suddenly having problems. It is for a whiteboard app that can also be seen here. The problem I am having is that when I run the command "node server.js" in the node.js command prompt I don't get anything, not even an error. I have tried other tests like Hello World and it has worked fine. My server.js file is listening on port:4000. I think this might be the issue. Here is the code if you think it might be something else.
(function() {
var io;
io = require('socket.io').listen(4000);
io.sockets.on('connection', function(socket) {
socket.on('drawClick', function(data) {
socket.broadcast.emit('draw', {
x: data.x,
y: data.y,
type: data.type
});
});
});
}).call(this);