Socketio does not work as expected though it does localy

i have a server on node and a react client ,
it is a socketio multiplayers memory match gaqme .
The muktyplayers management works fine localy but on deply the second player that joins does not see the first.

Hi,

There will always be differences between environments: development mode/Local, production mode/Render, etc. These differences need to be considered and configured as required for your own app in each environment.

You’ve not provided much detail here, so giving any specific pointers will be tough.

However, a common issue we see with projects using WebSockets is that the project has a separate port/server for them. Render only exposes a single port to the public internet, so WebSockets and any other http calls must go through one server. SocketIO documents this, with an example integrating with Express in their docs here: https://socket.io/get-started/chat#integrating-socketio

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.