Appearance
Setup And CLI
Installation
Install broadcasting support through your package manager:
bash
npx holo install broadcastbash
pnpm dlx holo install broadcastbash
yarn dlx holo install broadcastbash
bunx holo install broadcastThis generates:
config/broadcast.tsserver/broadcast/server/channels//broadcasting/configroute integration/broadcasting/authroute integration- framework Flux package dependency (
@holo-js/flux-react,@holo-js/flux-vue, or@holo-js/flux-svelte)
Next.js receives generated public route files for /broadcasting/config and /broadcasting/auth. Nuxt and SvelteKit receive internal framework route integration for the same URLs. User code does not create or import these routes directly.
File Generation
bash
npx holo make:broadcast orders/shipment-updated
npx holo make:channel orders.{orderId}Running The Worker
bash
npx holo broadcast:workbash
pnpm dlx holo broadcast:workbash
yarn dlx holo broadcast:workbash
bunx holo broadcast:workbroadcast:work is required for the self-hosted holo driver. Hosted providers do not require this local worker.
Runtime support:
- Bun: uses Bun websocket server path.
- Node: uses Node HTTP + websocket path.
Minimal Verification
- Install broadcast.
- Add channel authorize callbacks in
server/channels. - Add event factories in
server/broadcast. - Dispatch one event from server code.
- Subscribe from UI using Flux.
- Confirm worker is running for
holo.