Node.js on a remote server: io is not defined

I'm building an application that links to a node.js hosted on my home computer (78.233.79.103:8000)

The server is properly istalled (if you go to the addres I gave you'll se the socket.io works) If I run the server in localhost with

node server.js

all is good, the application works

Then when I run the application on my other pc or on my iPad (I wrapped it with phoneGap so it's just a web app included in a native iOS app), trying to connect the io on 78.233.79.103:8000 i got the console log:

io is not defined

here is my sourcecode: https://github.com/synbioz/puissance4

look for the server.js

I know I only call io = require('socket.io').listen(PORT); but kwnow also I should create something like:

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(8000, '78.233.79.103');

that actually doesn't works

Any idea?

probably because .listen() doesn't return this.

try writing them in separate lines.

var io = require('socket.io');
io.listen(PORT);