I\'m working on a Node.js app (it\'s a game). In this case, I have some code set up such that when a person visits the index and chooses a room, he gets redirected to the pr
You could directly inject the gameState variable into javascript on the page.
<% if (gameState) { %>
I have a game state!
<% } %>
Another option might be to make an AJAX call back to the server once the page has already loaded, return the gameState JSON, and set clientGameState to the JSON response.
You may also be interested in this: How can I share code between Node.js and the browser?