diff options
author | 2023-10-02 19:02:25 -0700 | |
---|---|---|
committer | 2023-10-02 19:02:27 -0700 | |
commit | 47651f321ae5eb82686da5d759e9b1b5b12340ad (patch) | |
tree | e0e96613fa68322e597ef3bf3014b4eee66f4417 | |
parent | b444c0b98db6dee5a10d680f30ba1c0fbff4f285 (diff) | |
download | bun-47651f321ae5eb82686da5d759e9b1b5b12340ad.tar.gz bun-47651f321ae5eb82686da5d759e9b1b5b12340ad.tar.zst bun-47651f321ae5eb82686da5d759e9b1b5b12340ad.zip |
Update ws example
-rw-r--r-- | docs/api/websockets.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/api/websockets.md b/docs/api/websockets.md index 4e55b8761..7722d731a 100644 --- a/docs/api/websockets.md +++ b/docs/api/websockets.md @@ -192,7 +192,7 @@ const server = Bun.serve<{ username: string }>({ close(ws) { const msg = `${ws.data.username} has left the chat`; ws.unsubscribe("the-group-chat"); - ws.publish("the-group-chat", msg); + server.publish("the-group-chat", msg); }, }, }); |