var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);

app.use(express.static(__dirname + "/public"));

app.get('/', function(req, res){
    res.sendFile(__dirname + '/public/login.html');
});

io.on('connection', function(socket){
    socket.on('chat message', function(msg){
        io.emit('chat message', msg);
    });
});

http.listen(3000, function(){
    console.log('Servidor online: Ouvindo porta 3000');
});

@@ -411,19 +411,17 @@
 .listen(
-300
+8
 0, funct
@@ -479,11 +479,9 @@
 rta 
-300
+8
 0');

Update servidor.js