From 927e245c26035adcb3b0b770f6503efaeb0b33ed Mon Sep 17 00:00:00 2001 From: louisa Date: Wed, 14 Jun 2023 20:53:30 +0200 Subject: [PATCH] socket things --- app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index ea35cb3..79677f1 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,7 @@ app.use(express.static(path.join(__dirname, "public"))); var io = require('socket.io')(server); - +//here we are listening to the data coming in from the modules, it's called node-data in the html io.on('connection', function(socket){ parser.on('data', function(data) { @@ -33,7 +33,8 @@ var io = require('socket.io')(server); console.log('Node.js is listening!!'); socket.on("blink", (arg, callback) => { - io.emit('blink'); + const message = "blink"; + io.send(message); }); socket.on('chat message', (msg) => {