This project demonstrates the use of Server-Sent Events (SSE) with a Go server to facilitate real-time data streaming. It allows dynamic updates to an index.html
file, providing an interactive experience for users.
In this mini project, I explored the capabilities of SSE to push updates from the server to the client without requiring the client to make repeated requests. This enables efficient real-time data delivery for applications such as notifications, live updates, or dashboards.
To run this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/PatricioPoncini/server-side-events.git
cd server-side-events
-
Install Go: Ensure you have Go installed on your machine. You can download it from Go website
-
Run the Go server:
go run .
- Open the web page: Open the
index.html
file in your web browser to see the real-time updates in action.
- Real-time data streaming from the server to the client.
- Dynamic updates in the web page without refreshing.
- Lightweight and efficient use of resources.
- MDN Web Docs: Using Server-Sent Events
- YouTube: Server-Sent Events Tutorial
- W3Schools: Server-Sent Events
Check out the demonstration of how this project works: Watch the video