background change when knob is at 21

master
louisa 1 year ago
parent 3d713d30f4
commit 608f1b5543

@ -16,6 +16,13 @@
// Listen for custom events from the server
socket.on('node-data', function(data) {
console.log(data); // Log the received data to the browser's console
if (node === 'node4' && value === '21') {
// Change the background color to red
document.body.style.backgroundColor = 'red';
} else {
// Restore the default background color
document.body.style.backgroundColor = 'white';
}
});
</script>
<script src='socket.io/socket.io.js'></script>

Loading…
Cancel
Save