What is Node.js
Baidu Encyclopedia:
Node.js is a JavaScript Operating environment. Node.js uses an event-driven, non-blocking I/O model.
Existence value: HTTP requests are stateless and one-time, and many websites currently require real-time updates , Such as Moments. A friend of yours has sent a Moments to your friends and needs to be pushed to friends in real time. If the traditional HTTP request requires the client to maintain a long connection with the server, the server can send data to the client in real time, occupying memory, causing a lot of pressure on the server.
Node.js provides an environment, he is written in javaScript, js itself is an event-driven language. When a new event occurs, the server is notified to query the data and sent to the client, so there is no need for the server to maintain a long connection.
Reference link: https://www.cnblogs.com/suhaihong/p/6598308.html