Keep information sent to game server between html files and between rooms


I’m extremely new to node.js and Colyseus, so this may be a basic question, but one I need an answer to.

In the game’s homepage, you POST a username to the server, which, if it’s not already taken, takes you to the room list. From the room list, you can join rooms, and play if there is an available slot and spectate otherwise. You can exit the room and go back to the room listing. You retain your username between transfers.

How do I go about doing that? The rooms send an html file, and the room listing sends a different one.

I’m using colyseus and colyseus.js.

Thank you so much for the support, it means a lot to know that I can count on people when I have no clue what I'm doing.