This project demonstrates the use of Server-Sent Events (SSE) to simulate the upload of a large IP address list while providing real-time progress updates to the client. The real-time messages are sent on multiple channels.
Only uses built-in features of modern browsers and no server dependencies.
In live deployment, you would probably want to use a library to simplify sending the SSE messages.
- Python 3.8 or newer.
- A modern web browser that supports Server-Sent Events (SSE) (e.g., Chrome, Firefox, Edge).
git clone https://github.com/highpps/sse-demo.git
cd sse-demo
Ensure you have Python installed.
Start the server:
python3 server.py
Open your browser and go to: http://localhost:8080/. Click the Start Upload button to see the progress bar update in real time.
You can open your browsers developer tools and check the "Network" tab before clicking the button. You can see the live updates there.