I want to develop an app via socket.io which will have 2 parts. One client, and another server. However, the thing is that the client app will be running on another server, and the server app will be running on an another separate server. Now I'm not getting that how to use socket.io in this case? All the examples which I can find on internet use the localhost. Can someone please help? An example will be appreciated.
I think you can use a common server for client and server, by passing correct options parameters while creating a socket server. You can refer to the documentation provided by socket to know the possible parameters that you can pass.