💽👫 Checkpoint

./server.js:530995/100
./room.js:530995/323
./views/room.handlebars:530995/140
This commit is contained in:
Glitch (hello-express)
2020-04-09 15:26:47 +00:00
parent 645e0f11e5
commit 5bf6096180
3 changed files with 19 additions and 4 deletions

View File

@@ -36,8 +36,11 @@
}));
};
socket.onmessage = function(event) {
console.log(event);
socket.onmessage = function(msg) {
msg = JSON.parse(msg);
if (msg.type === "buzz") {
alert(`${msg.participant} buzzed`);
}
};
socket.onerror = function(error) {