express 3.0 + socket.io incompatible, work around solution?

Despiting the express 3.0 version is not compatible to socket.io, that keeps getting

ReferenceError: io is not defined

After searching around, there is a work around seems will work, but where/how to implement the code? This code seems just refer a path to the socket.io.js that helps the server to find socket.io, not sure where to put it in order to make it operate. How will you do it?

work around code(source):

var fs = require('fs');
app.get('/socket.io/socket.io.js', function(req, res) {
fs.readFile('/PROJECT_HOME/node_modules/socket.io/lib/socket.io.js', function(error, content) {
    if (error) {
        res.writeHead(500);
        res.end();
    }
    else {
        res.writeHead(200, { 'Content-Type': 'text/javascript' });
        res.end(content, 'utf-8');
    }
   });
});

Here is my code that awaiting to be integrated with the work around code:

app.js

var express = require('express'),
http = require('http');

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


app.configure(function () {
app.use(express.static(__dirname + '/public'));
});

app.listen(3002);


io.sockets.on('connection', function(socket) {
socket.emit('news', {hello: 'world'});
socket.on('my other event', function (data) {
    console.log(data);
});
});

index.html

<script src="http://localhost:3002/socket.io/socket.io-client.js"></script>
<script>
var socket = io.connect('http://localhost:3002');
socket.on('news', function (data) {
    console.log(data);
    socket.emit('my other event', { my:'data' });
});
</script>