Websocket 'broadcast' demo using FastAPI/Starlette
An example of the familiar 'chat' websocket demo app, implemented in FastAPI / Starlette.
Run with
uvicorn app:app
And then point your browser to http://localhost:8000. REST API documentation is available under the /docs
endpoint.
Data from the server is JSON in the form
{
"type": ...,
"data": {
...
}
}
Where type
is one of: