This is simple Server Sent Events (SSE) example that updates stock prices when market moves. Data source is predefined array with prices. These is random delay between 1 and 3 seconds between each event. Feel free to download and study source code.
This is simple log console. It is useful for testing purposes and to understand better how SSE works. Event id and data are logged for each event.