Last active
December 6, 2019 20:55
-
-
Save adregan/ac307e5069831c921cd93d2dd621a528 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
body, html { | |
height: 100%; | |
margin: 0; | |
width: 100%; | |
} | |
body { | |
background: #282A36; | |
color: white; | |
} | |
pre { | |
height: 100vh; | |
margin: 0; | |
overflow: scroll; | |
padding: 1rem; | |
width: 100vw; | |
} | |
</style> | |
</head> | |
<body> | |
<pre id="console"> | |
Console Output: | |
</pre> | |
<script> | |
const toMessageWriter = element => { | |
let lineNumber = 1; | |
return (message) => { | |
element.textContent = `${element.textContent} \n ${lineNumber}. ${message}`; | |
lineNumber++; | |
} | |
} | |
console.log = console.warning = console.error = toMessageWriter(document.getElementById('console')); | |
</script> | |
<script> | |
console.log('INIT'); | |
const socket = new WebSocket('ws://10.129.144.65:55537'); //IP address as found in appspace | |
socket.addEventListener('open', (event) => { | |
console.log('socket opened', event); | |
}); | |
socket.addEventListener('close', (event) => { | |
console.log('socket closed', event); | |
}); | |
socket.addEventListener('message', (event) => { | |
console.log('socket message', event); | |
}); | |
socket.addEventListener('error', (event) => { | |
console.error('socket error', event); | |
}); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Name": "Websocket Test", | |
"Id": "com.onepeloton.websocket", | |
"Developer": "", | |
"Description": "", | |
"Thumbnail": "thumbnail.png", | |
"Schema": "schema.json", | |
"Model": "model.json", | |
"Startup": "index.html", | |
"Version": "0.1.0", | |
"Network": { | |
"RequiresConnection": true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"inputs": [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"inputs": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment