|
|
|
@ -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) => {
|
|
|
|
|