🤖🍲 Checkpoint

./room.js:530995/86
./server.js:530995/1413
./package.json:530995/1484
./views/room.handlebars:530995/1594
This commit is contained in:
Glitch (hello-express)
2020-04-09 11:04:28 +00:00
parent b337088cb6
commit 1abee4f9d7
5 changed files with 47 additions and 5 deletions

View File

@@ -22,5 +22,21 @@
BUZZ
</button>
</main>
<script>
let socket = new WebSocket(`wss://${window.location.hostname}`);
socket.onopen = function(e) {
socket.send("My name is John");
};
socket.onmessage = function(event) {
a
};
socket.onerror = function(error) {
alert(`[error] ${error.message}`);
};
</script>
</body>
</html>