2018-02-26 00:01:50 +00:00
|
|
|
Welcome to Embark!
|
2018-02-26 14:45:46 +00:00
|
|
|
|
|
|
|
<script>
|
2018-02-26 22:44:09 +00:00
|
|
|
var ws = new WebSocket("ws://localhost:8000/embark/logs");
|
2018-02-26 14:45:46 +00:00
|
|
|
|
2018-02-26 22:44:09 +00:00
|
|
|
ws.onopen = function() {
|
|
|
|
};
|
2018-02-26 14:45:46 +00:00
|
|
|
|
2018-02-26 22:44:09 +00:00
|
|
|
ws.onmessage = function (evt) {
|
|
|
|
var received_msg = evt.data;
|
2018-02-27 11:34:50 +00:00
|
|
|
console.log(JSON.parse(received_msg));
|
2018-02-26 22:44:09 +00:00
|
|
|
};
|
2018-02-26 14:45:46 +00:00
|
|
|
|
2018-02-26 22:44:09 +00:00
|
|
|
ws.onclose = function() {
|
|
|
|
console.log("Connection is closed...");
|
|
|
|
};
|
2018-02-26 14:45:46 +00:00
|
|
|
|
2018-02-26 22:44:09 +00:00
|
|
|
window.onbeforeunload = function(event) {
|
|
|
|
ws.close();
|
|
|
|
};
|
2018-02-26 14:45:46 +00:00
|
|
|
</script>
|
|
|
|
|