score:3

Accepted answer

You need to bind the socket.io to the http server not the application server. Changes this to below..

var express = require('express'),
    app = express(),
    http = require('http'),
    server = http.createServer(app),
    io = require('socket.io').listen(server);

Refer Express guide for more info.

EDIT

To correct the Jquery error..

replace

jQuery(function($){

with

$(document).ready(function($)

Related Query

More Query from same tag