-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·35 lines (32 loc) · 1.87 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<head>
</head>
<body>
<div id="app">
u:xn2n7731qz2zf322
<br />
socket.emit('get-questions', {contestId: '5883182fa263df4a9399ccc3'})
<br /><br />
socket.emit('create-contest', {name: 'test', start: Date.now(), numberOfQuestions: 5, participants: ['u:aooykoiy9hihmp8i'], language: 'english'});
<br /><br />
socket.emit('list-contacts', {'eventToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBJZCI6IjA3MjYwOWRjLWExMDQtNDhkNy05YjY2LWFlOWI5ZTdlOTUzOSIsImV4cCI6MTQ4NTcwNDkzNCwidXNlcklkIjoidTphb295a29peTloaWhtcDhpIiwiaWF0IjoxNDg1MTAwMTM0LCJqdGkiOiIxYTlmYjFjYy04MTJhLTRlMmEtYmZiZS1lMjA1ODMzMjJjM2UifQ.uYLvOiCiPPPvgq4umr9g5WHRWQMd6Oq0uk2xcvmG1y8&'})
</div>
<script src="/socket.io.js"></script>
<script>
localStorage.debug = "socket.io-client:socket";
function display(data) {
document.getElementById('app').innerText = JSON.stringify(data) + '\n';
}
var socket = io.connect('/', {query: 'eventToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBJZCI6IjA3MjYwOWRjLWExMDQtNDhkNy05YjY2LWFlOWI5ZTdlOTUzOSIsImV4cCI6MTQ4NTk4MDkyOCwidXNlcklkIjoidTphb295a29peTloaWhtcDhpIiwiaWF0IjoxNDg1Mzc2MTI4LCJqdGkiOiI5YzJiOTczNS00YTEyLTQ0ODUtOTRhMi0wNDc5MTk0YzU0MjAifQ.KTRaFhmn9QONbnkjw5eTZZFcj_LytdWVI808m8JL5t0&userId=u:aooykoiy9hihmp8i'});
socket.on('join-contest-complete', display);
socket.on('message', display);
socket.on('get-questions-complete', display);
socket.on('err', display);
socket.on('list-contacts-complete', display);
socket.on('install-required', display);
socket.on('list-live-complete', display);
socket.on('list-categories-complete', display);
socket.on('get-leaderboard-complete', display);
socket.on('leaderboard-updated', display);
socket.on('submit-answer-complete', display);
</script>
</body>