diff options
author | amelia <[email protected]> | 2022-05-09 22:14:32 -0500 |
---|---|---|
committer | amelia <[email protected]> | 2022-05-09 22:14:32 -0500 |
commit | 046ef590a697e88a23f4ed528df5a5c902017c5e (patch) | |
tree | 8bb406b0128b2e1dcbb280303580bd3b7a2796f5 | |
parent | e5de1ca783ee0c14e04b6d63f677cbb852b168f1 (diff) |
working on peer to peer
-rw-r--r-- | index.html | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2,6 +2,7 @@ <head> <title>chessn't</title> <link rel="icon" href="icon.png"> + <script src="https://unpkg.com/[email protected]/dist/peerjs.min.js"></script> <!-- thank you to these kind people :D --> <style> html, body { @@ -64,7 +65,13 @@ body::-webkit-scrollbar { </div> <script> - +var peer = new Peer(); +peer.on('connection', function(conn) { + conn.on('data', function(data){ + // Will print 'hi!' + console.log(data); + }); +}); //colors var board1 = '#232323' var board2 = '#ff6633' |