R
R
Raydon122021-06-17 15:31:15
MySQL
Raydon12, 2021-06-17 15:31:15

How to implement a real-time application in Node.js in conjunction with MySQL?

Hey Habr! Tell me, how in Node.js in conjunction with MySql to make it so that the client receives personal messages without updating the page, some files, for example, news were updated, if we take VK or faceboock as an example? The option with socket.io disappears, because. when the application exits, the connection with the server is lost, and I need the user to receive notifications of new messages even when the application is closed, for example. Now I use the usual get and post requests to the server, and from the server it is already in the database, however, of course, this option is not suitable, because. You have to refresh the page all the time. The client is located as a mobile application. So, by analogy with how VK displays notifications on the phone about a new message even when the application is closed, I want to do a similar thing. How is this possible to implement???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alice, 2021-06-17
@w3bsmes

Hold

A
Andrey Shatokhin, 2021-06-17
@Sovigod

This is called push notifications. It's not hard to google.
A push-token is requested from the device (phone-browser, etc.), and a notification can be sent to the device using it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question