In my web-based game, one player performs an action that forces all players to then be taken to a new page. I'm simply trying to send this request from the client Javascript to the Express server, which in turn serves the new webpage to all players.
How do I: a) send the request to the server in the first place? Use a fetch function to an app.get on the server? I suppose I can use an action on a button, but I'd rather have a function that triggers the server to get the new page. b) have the server code force all players to the new URL regardless of where they are in the game?
I'm using socket.io to communicate otherwise between the clients and the server.
Any help would be appreciated. Thanks in advance!