I have a couple of questions about an app that I am making and publishing on Heroku. I've made a simple HTML/JS game and I want to implement some server side scripts. I have some experience with node and socket.io but I don't know how they work on a Heroku platform. The game is an asynchronous trivia game.
I have the following questions:
1) I want to have many server side functions, how will I call a specific function and pass specific parameters from client side, and vice versa?
Example: Client calls function on server that player 1 finished move (with some answer), I process that info in database and want to then call client side function of player 2 that he is on move.
2) Where should I put server side scripts when I'm deploying?
3) What changes do I need to make in package.json when I want to implement node and what changes should I make for socket.io?
I know that those are some trivial stuff but I never did something like this before and other documentations are unclear, too complicated for stuff like this, etc... I would really appreciate help.