|
|
@ -18,13 +18,14 @@ server.listen(port, () => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
app.use(express.static(path.join(__dirname, "public")));
|
|
|
|
app.use(express.static(path.join(__dirname, "public")));
|
|
|
|
|
|
|
|
io.emit("blink");
|
|
|
|
|
|
|
|
|
|
|
|
var io = require('socket.io')(server);
|
|
|
|
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
|
|
|
|
//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){
|
|
|
|
io.on('connection', function(socket){
|
|
|
|
console.log("A client connected!");
|
|
|
|
console.log("A client connected!");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parser.on('data', function(data) {
|
|
|
|
parser.on('data', function(data) {
|
|
|
|
const msg = data.split(' ');
|
|
|
|
const msg = data.split(' ');
|
|
|
|