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