This question is an exact duplicate:
- Sample chat does not start [closed] 3 responses
I try to run the chat from the example on the SOCKET.IO website.
server.js:
var express = require('express'); var app = express(); var server = app.listen(3000); var io = require('socket.io')(server); io.on('connection', function(socket){ socket.emit('an event sent to all connected clients'); console.log('a user connected'); socket.on('disconnect', function(){ console.log('user disconnected'); }); socket.on('chat message', function(msg){ io.emit('chat message', msg); console.log('message: ' + msg); }); }); I launch: node server.js &
netstat -lnp -t tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 9429/node As far as I understand, everything is fine, port 3000 is listening.
I try from the browser: mydomen.com:3000 - does not load .
on host - Service: Virtual server / OpenVZ
Where is that so? Believe me - I shoveled dozens of scripts, I killed 2 days, I don’t understand what's the matter - everyone works, I don’t.