-4

I have implemented real time chat using Socket.io with Node.JS

Everything works perfectly, except it did not work on my computer. I narrowed the problem down to the fact my router was by default blocking the outbound port (9239)

The problem is, I cant diagnose random users of my webpage's firewall issue. So I need to know what port I should bind node.js to so that everybody can use it.

I could create its own url and bind it to 80 or 443, but I have read that may be bad practice?

Michael
  • 8,229
  • 20
  • 61
  • 113

1 Answers1

1

There are many ways to do this. One way is have a web server (like Apache or nginx) field the HTTP(80) or HTTPS(443) traffic, serve static images, and pass certain requests onto node.js. On unix, binding to a port below port 1024 requires root access.

davejagoda
  • 2,420
  • 1
  • 20
  • 27