Search code examples
socket.iocloudflare

socket.io port 3002 timeout after using Cloudflare


I'm using socket.io for chat in my website. Yesterday i changed to DNS to cloudflare after the port 3002 gives time out error

Socket.io

server.listen('3002', function(){
  console.log('listening on port');
});

Error :

ERR_CONNECTION_TIMED_OUT

why ?


Solution

  • 3002 is not a supported port for standard Cloudflare, see here.

    Additionally you should take a look at cloudflare's site with respect to support for websockets.