Too Long; Didn't Read
Long Polling is the simplest way of having a persistent connection with the server. It is simply hanging out the connection but with no specific protocol like WebSocket. Long polling is the most common way to use NodeJS to send and receive messages in real-time. To reduce the complexity of the sample, let’s assume that we have only one functional requirement which is the client. For this, we have 2 simple endpoints: Send Message: GET /new-message-post; Receive Message: Re-messages.