Example of real-time messaging using Go, PostgreSQL LISTEN/NOTIFY, and WebSocket.
Use websocat as WebSocket client.
# launch
docker compose up
go run .
# Alice
websocat 'ws://localhost:8080/ws?room_id=e5c87218-676b-4185-9335-3fe48eff6a38'
{"foo", "bar"} # send JSON message
# Bob
websocat 'ws://localhost:8080/ws?room_id=e5c87218-676b-4185-9335-3fe48eff6a38'
# {"foo", "bar"} # receive JSON message