aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authoramelia <[email protected]>2022-05-09 22:14:32 -0500
committeramelia <[email protected]>2022-05-09 22:14:32 -0500
commit046ef590a697e88a23f4ed528df5a5c902017c5e (patch)
tree8bb406b0128b2e1dcbb280303580bd3b7a2796f5 /index.html
parente5de1ca783ee0c14e04b6d63f677cbb852b168f1 (diff)
working on peer to peer
Diffstat (limited to 'index.html')
-rw-r--r--index.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/index.html b/index.html
index 4dd9c54..64d6c29 100644
--- a/index.html
+++ b/index.html
@@ -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'