Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple sse example #293

Closed

Conversation

audreyfeldroy
Copy link
Member

Minimalist SSE example:

  • Time generator yields a TimeUpdateEvent every second
  • SSE server endpoint /time-sender sends out the time every second
  • Client / updates a P with the time on each TimeUpdateEvent

This is inspired very much by https://github.com/fabge/fasthtml-sse. Full credit to @fabge for the groundbreaking work exploring SSE in FastHTML 🙌

audreyfeldroy and others added 2 commits August 14, 2024 12:26
* Time generator yields a `TimeUpdateEvent` every second
* SSE server endpoint `/time-sender` sends out the time every second
* Client `/` updates a `P` with the time on each `TimeUpdateEvent`
Co-authored-by: Daniel Roy Greenfeld <daniel@feldroy.com>
@pydanny pydanny closed this Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants