mirror of https://github.com/embarklabs/embark.git
23 lines
394 B
HTML
23 lines
394 B
HTML
Welcome to Embark!
|
|
|
|
<script>
|
|
var ws = new WebSocket("ws://localhost:8000/embark/logs");
|
|
|
|
ws.onopen = function() {
|
|
};
|
|
|
|
ws.onmessage = function (evt) {
|
|
var received_msg = evt.data;
|
|
console.log(JSON.parse(received_msg));
|
|
};
|
|
|
|
ws.onclose = function() {
|
|
console.log("Connection is closed...");
|
|
};
|
|
|
|
window.onbeforeunload = function(event) {
|
|
ws.close();
|
|
};
|
|
</script>
|
|
|