I'm getting started with node.js and socket.io, all the tutorials that I've found online suggest using this In the client side code.
<script type="text/javascript" src="http://localhost:3000/socket.io/socket.io.js" ></script>
var socket = io.connect('localhost:3000');
This works fine if client runs on the same host. I'm trying to write an app where client can connect through some other host. How do I do that?
I know I can use ip address of host instead of "localhost" for this purpose but I want to know if there is more generic way of doing this so that the code is host independent.