Skip to main content

Goal

Push real-time updates (chat messages, notifications, live dashboards) to connected clients over WebSocket.

Steps

1. Enable the Stream module

iii-config.yaml

2. Write to a stream

stream-writer.ts

3. Read from a stream

stream-reader.ts

4. Connect a client

Clients connect to the stream WebSocket endpoint to receive live updates:
client.js

Result

Any data written to the stream via stream::set is immediately pushed to all connected WebSocket clients subscribed to that stream and group. No polling needed.