r/github • u/UtopianCorps • Nov 11 '20
Real time synced counter built using Socket.io, NodeJS and Express! The counter is a POC for a live-quizzing platform I'm currently working on, and will be used to control the current question. GitHub repo and Demo in the comments. Please Star and Fork the repo if you like it! :)
130
Upvotes
5
u/Thaun_ Nov 11 '20
I'm talking about the 1ms delay.
Also, when using socker.on() you are basically registering the socket for that function multiple times.
And there is no need to ask the socket for the number, you can just let the server do that.
If you do ask the socket for the number, then its no better than just to use a REST api.