Answer the question
In order to leave comments, you need to log in
How to update information on a page using node js?
The question is purely organizational, there is such a situation:
a server rises, an IO socket is cut, and let's say there is a value equal to 0, so if it is equal to 1, how to update the information on the page specifically display this value there, if you can link to examples, documentation, etc.,
And it’s even better that it was visible to all users, one-time, not using Ajax from each client to the server, but that the node would give the information to the web page and be visible to everyone
Answer the question
In order to leave comments, you need to log in
When updating a variable, call an event, for example io.sockets.emit() - for all sockets, or send socket.emit() for one socket, there is almost nothing easier.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question