Use technique so-called long polling, when the frontend requests for some data from the server, server checks whenever there is a new record to send back if there is a record(s) it sends a response if there is not, it keeps the connection opened until the new record appears.
Use socket connection (bidirectional client-server communication), when the client opens a socket connection and waits for a specific event to be emitted by the server