Aca el codigo:
Código:
var Server = function(port)
{
this.app = require("express")();
this.www = require("http").createServer(this.app);
this.io = require("socket.io")(this.www);
this.app.get("*", function(req,res){
res.send("Hello World");
});
this.www.listen(port);
console.log("-> Servidor Socket Iniciado (Port: " + port + ")");
}
module.exports = Server;


