pub-trivia / trivia-app

Play trivia with friends around the world
https://pub-trivia.herokuapp.com
5 stars 4 forks source link

Push question via socket #141

Closed cynthiarich closed 4 years ago

cynthiarich commented 4 years ago

This PR does a couple things:

  1. It refactors the app to push the next question with the socket instead of having each client make a separate call for it.
  2. The console is getting a little unwieldy with so many console.logs in the code, so I've removed a bunch that were in parts of the code that seem stable.
  3. I also removed some code that has been commented out for a while in a general effort to start cleaning up.

For the first one, the socket appears to be sending the question more than once to each client. I think I can convince the client to ignore it if it keeps happening, but I want to see if it is an issue with me running multiple clients locally or if it is a real problem. I'd like to merge this as is and see how it behaves in prod.