Adding port handling for socket.io when not on www. Useful for dev and debugging.