/server-sent-event-model

A very simple python app that applies the server sent event model

Primary LanguagePython

Server Sent Event model

A very simple python app that applies the Server Sent Event model

How to run?

  • Install python in your machine
  • Install Python libraries using pip install -r requirements.txt
  • Run the program by using python server-event-modal.py
  • Open the following link http://127.0.0.1:8888/sse or use the following code in the browser console:
const sse = new EventSource("http://localhost:8888/sse");
sse.onmessage = console.log