Skip to content

Commit

Permalink
Update ws example
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhacks committed Oct 3, 2023
1 parent b444c0b commit 47651f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/websockets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
},
});
Expand Down

0 comments on commit 47651f3

Please sign in to comment.