1
0
Fork 0
mirror of https://api.glitch.com/git/yaswvc synced 2026-01-12 05:08:11 +00:00
yaswvc/public/main.js
Glitch (hello-express) 67e55fbd02 🐲️ Checkpoint
./package.json:3115263/1352
./server.js:3115263/15
./public/main.js:3115263/41
2020-05-25 18:22:23 +00:00

16 lines
315 B
JavaScript

// client-side js, loaded by index.html
// run by the browser each time the page is loaded
let peer = new Peer({
host: '/',
path: '/peerjs/myapp'
});
peer.on('open', (id) => {
console.log('My peer ID is: ' + id);
});
peer.on('error', (error) => {
console.error(error);
});
console.log("hello world :o");