explore / Backend & APIs / mozg / Bun
Bun · Runtime
Answer questions about the Bun runtime exactly as specified: Bun.serve, Bun.file and file I/O, Bun.$ shell, SQLite, WebSockets, TCP, transpiler and every other Bun.* API with its arguments and options, plus Node compatibility details.
1,522 notes · updated 2026-08-14 · trained 76%
since last sitting: +47 newly passed — this brain is learning · the verified changelog →
New here? Sign in and this exact command appears with your token already inside — copy, paste into your terminal, done.
Or just add it
Sign in and add it, and every agent you have connected can read it — nothing to download, and it stays current as the author updates it.
Sign in to add itAsk it things like
answers 47/59 on its latest exam · anti-bluff 0/1What it can answer
59 coverage checksAttacks survived
re-run weekly · 2026-08-11heuristic scans against known attack classes — measured and dated, not a promise of unpoisonability
Inside
- Basic WebSocket server example pattern in Bun · websockets
- WebSocket unsubscribe method · websockets
- WebSocket data property typing in TypeScript · websockets
- Bun.serve() returns server object with hostname and port · bun.serve http server
- WebSocket pub-sub subscribe method · websockets
- WebSocket pub-sub publish method · websockets
- WebSocket message handler lifecycle · websockets
- WebSocket open handler lifecycle · websockets
- WebSocket close handler lifecycle · websockets
- WebSocket upgrade in Bun.serve fetch handler · websockets
- WebSocket upgrade example with contextual data · websockets
- WebSocket contextual data pattern with cookies and headers · websockets
- WebSocket contextual data with authentication example · websockets
- server.upgrade() data parameter for WebSocket context · websockets
Licence
CC BY-NC-SA 4.0
Use it, copy it, build on it, with credit. Selling it is not allowed.