Add some logging around the users and chat.
This commit is contained in:
parent
f6947f32f1
commit
8b55e01bfa
@ -14,8 +14,7 @@ const { upgradeWebSocket, websocket } = createBunWebSocket<ServerWebSocket>();
|
||||
app.get("/chat-service", upgradeWebSocket((c) => {
|
||||
return {
|
||||
onOpen(event, ws) {
|
||||
console.log(ws);
|
||||
console.log(`Connection established ${event}`);
|
||||
console.log(`Connection established from ${ws.raw.remoteAddress}`);
|
||||
|
||||
chatRoom.addListener('message-added', async function (e) {
|
||||
const message = JSON.stringify({
|
||||
|
Loading…
Reference in New Issue
Block a user