From 8b55e01bfa81f3148a0421ebd9b62424fe204764 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Sun, 27 Oct 2024 22:52:07 -0400 Subject: [PATCH] Add some logging around the users and chat. --- chat-app/src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chat-app/src/index.ts b/chat-app/src/index.ts index a267642..451ee6c 100644 --- a/chat-app/src/index.ts +++ b/chat-app/src/index.ts @@ -14,8 +14,7 @@ const { upgradeWebSocket, websocket } = createBunWebSocket(); 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({