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, () => {