Soketi is used as a websocket server to handle notifications from backend in this simple case python to frontend. Using websocket protocol.
This simple gist explain how to use it in practice.
- compose.yaml: to run
socketi serverusingdocker compose - webpage.html: the HTML page with JS code to bind
socketi events - send_soketi_event.py: the
python scriptto sendsocketi eventstosocketi serverthat will be arrived inwebpage.html
docker compose up[+] Running 2/2
✔ Network soketi_default Created 0.0s
✔ Container soketi Created 0.0s
Attaching to soketi
soketi |
soketi | 🕵️♂️ Initiating metrics endpoints...
soketi |
soketi | 🎉 Server is up and running!
soketi | 📡 The Websockets server is available at 127.0.0.1:6001
soketi | 🔗 The HTTP API server is available at http://127.0.0.1:6001
soketi | 🎊 The /usage endpoint is available on port 9601.
soketi |
In my case as I'm in Linux and I have firefox:
firefox webpage.html
pip install pusher
python send send_soketi_event.py
python send send_soketi_event.py
python send send_soketi_event.py
![]() |
