This project demonstrates how to implement Server-Sent Events (SSE) to send real-time updates from a server to a client. In this example, the server sends the current time to the client every second without the need for the client to request updates.
- Real-time updates from the server to the client using SSE.
- The server sends the current time to the client every second.
- SSE allows for unidirectional communication where the server pushes updates to the client without needing a request each time.
- The server uses Express.js to serve an HTML file and sends time updates every second through an SSE connection.
- The client listens to the SSE stream and updates the webpage with the current time whenever the server sends new data.
- Node.js with Express.js for the server-side logic.
- SSE (Server-Sent Events) for real-time communication.
- HTML and JavaScript for the client-side rendering.
Before you begin, ensure you have met the following requirements:
- You have Node.js installed on your machine. You can download it from Node.js official website.
- Clone the repository:
git clone https://github.com/sariDaitch/sse-project.git