I Need Node.js HELP! (Express, Express-Session)

I Need Node.js HELP! (Express, Express-Session)
0

I am making a simple multiplayer game in Node.js (my first Node project), and I have finished all of the game play. The only problem I have is when I refresh the page, the game loses all of its progress. It is important to me that players do not lose their progress if they refresh the page, but rather pick up where they left off. I was able to do this in my older version of the game using PHP sessions, but now that I switched it over to Node.js, I have been having trouble tackling this issue of sessions. I would greatly appreciate any help if anyone has the time to look through the code with me.

Do you have your project on Glitch or somewhere where we can see the code you have tried (with respect to sessions management)?

I do not, I have all my files on my local computer. Sorry, I am just a beginner at all of this. I can put it up there if that would be best.

You could push your code to GitHub as a repo as another option. The nice thing about Glitch, is that we can see any changes you do “real-time” if you make some based on our suggestions.

Here is a link to the glitch, I’m not too worried about anything besides the node.js/session stuff. I am wanting to create session variables for the game state.

Here is a link to the glitch, I’m not too worried about anything besides the node.js/session stuff. I am wanting to create session variables for the game state.

Also, how can I start the server without having to run “npm start” in my command terminal?