Trouble running socket.io in ports other than 80

I'm running express.js on port 80, so socket.io has to go on other port. The problem is that, then, I have to load socket.io on the client with:

<script src="http://my_domain:8080/socket.io/socket.io.js"></script>

Which is horrible because I have to change my_domain everytime I switch from local machine to host.

I'm running express.js on port 80, so socket.io has to go on other port.

Wrong.

You can run Socket.io and Express on the same port; just pass same same http.Server instance to both of them.