]> git.cworth.org Git - zombocom-ai/blobdiff - index.js
Add the second half necessary for functional comments
[zombocom-ai] / index.js
index 3ffea3d9feef95ac81ac8a66c2b5c68badc018e9..27b37147c1796569df0e625d8b88db2998e7175a 100644 (file)
--- a/index.js
+++ b/index.js
@@ -11,9 +11,8 @@ app.get('/index.html', (req, res) => {
 });
 
 io.on('connection', (socket) => {
-    console.log('a user connected');
-    socket.on('comment', (comment) => {
-        console.log('comment: ' + comment);
+    socket.on('comment', (msg) => {
+        io.emit('comment', msg);
     });
 });