Search code examples
node.jsreactjsserverreal-time-data

How to get live information with nodes


I need some advice or help, I am trying to create an ordering system like the one in McDonald's and I need a live feed of the current orders and being able to manipulate these in real time as well, however I am not sure how to do that other than sending a get request like every second however that can cause performance problems, is there any other way?


Solution

  • There is! It's called socket.io and is made for real-time communication. In most cases, you have a server which manages the communication and also has a database. All clients will connect to this server and emit data or subscribe to events.

    There are tons of tutorials out there. I recommend you to follow one and build a simple chat application, before you use it in your ordering application.