https://github.com/9akashnp8/learn-server-sent-events
A demo chat repo with streaming response implemeted via Server-Sent Events
https://github.com/9akashnp8/learn-server-sent-events
event-stream eventsource-api fastapi react server-sent-events
Last synced: about 1 month ago
JSON representation
A demo chat repo with streaming response implemeted via Server-Sent Events
- Host: GitHub
- URL: https://github.com/9akashnp8/learn-server-sent-events
- Owner: 9akashnp8
- Created: 2023-10-23T18:06:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-27T08:16:13.000Z (over 2 years ago)
- Last Synced: 2025-03-20T04:55:27.303Z (about 1 year ago)
- Topics: event-stream, eventsource-api, fastapi, react, server-sent-events
- Language: TypeScript
- Homepage:
- Size: 262 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Server-Sent Events: Stream "events" from server to client
## About
This is a demo repo that uses [Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events), the specific use case being a Chat Application with Streaming Response from server. The repo contains implementations for Vannila js and React.
## Built with
- [React](https://react.dev/)
- Vanilla Javascript
- [Python (FastAPI)](https://fastapi.tiangolo.com/)
- [fetch-event-source](https://www.npmjs.com/package/@microsoft/fetch-event-source)
## Demo

## Get it running
1. Clone the repo:
`git clone https://github.com/9akashnp8/learn-server-sent-events.git`
2. Run `docker compose up` to get all the services up and running. The react client can be access via localhost:**5173** and vanilla-js-client via localhost:**5174**