From 461dedf9ddf972398af843b6ec9f0d1214035753 Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Mon, 25 May 2020 18:00:22 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=BA=F0=9F=8F=A0=20Checkpoint=20./publi?= =?UTF-8?q?c/main.js:3115263/248?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/main.js b/public/main.js index 0e3cb62..051599a 100644 --- a/public/main.js +++ b/public/main.js @@ -1,7 +1,14 @@ // client-side js, loaded by index.html // run by the browser each time the page is loaded -console.log(Peer); +let peer = new Peer(); +peer.on('open', (id) => { + console.log('My peer ID is: ' + id); +}); + +peer.on('error', (error) => { + console.error(error); +}); console.log("hello world :o");