Answer the question
In order to leave comments, you need to log in
How to install Socket.io on hosting?
Good afternoon.
I'm trying to install socket.io on the hosting, but it gives the following
server.js error:
var io = require('socket.io')(6001);
io.on('connection', function(socket){
socket.on('channelfxer', function(mychanel){
socket.join(mychanel);
});
socket.on('message', function(data){
socket.broadcast.emit('message',data);
});
socket.on('readed', function(data){
socket.to(data.room).emit('readed',data);
});
socket.on('disconnect', function(){ });
});
events.js:182
throw er; // Unhandled 'error' event
^
Error: listen EPERM :::6001
at Object.exports._errnoException (util.js:1016:11)
at exports._exceptionWithHostPort (util.js:1039:20)
at Server.setupListenHandle [as _listen2] (net.js:1307:14)
at listenInCluster (net.js:1355:12)
at Server.listen (net.js:1455:7)
at Server.listen.Server.attach (/home/k/kronosjy/node_modules/socket.io/lib/index.js:273:9)
at new Server (/home/k/kronosjy/node_modules/socket.io/lib/index.js:59:17)
at Server (/home/k/kronosjy/node_modules/socket.io/lib/index.js:44:41)
at Object.<anonymous> (/home/k/kronosjy/.local/ws.server/server.js:1:92)
at Module._compile (module.js:569:30)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question