From c3a4e73f280b17f661dac55dc6d18be302d5c01a Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Thu, 22 Oct 2026 00:01:42 -0600 Subject: [PATCH] chat without css --- index.html | 37 ++++++++++++++++++++++++++++++++++--- index.js | 5 +++++ 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index c3d7867..eb95cc8 100644 --- a/index.html +++ b/index.html @@ -1,9 +1,40 @@ + + + Socket.io Chat + -

Hello Marx from index.html file

-

This is some new text recently added

+

My Chat App

+ + +
+ +
+ - + diff --git a/index.js b/index.js index 5c2e496..7b134d4 100644 --- a/index.js +++ b/index.js @@ -16,6 +16,11 @@ io.on('connection', (socket) => { socket.on('disconnect', ()=> { console.log('User disconnected'); }); + + socket.on('chat message', (msg) => { + console.log('Received:', msg); + io.emit('chat message', msg); + }); }); server.listen(3333, () => {