Get reports through to the browser.
This commit is contained in:
9
server/static/control.js
Normal file
9
server/static/control.js
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
document.addEventListener('DOMContentLoaded', (e) => {
|
||||
let ws = new WebSocket('wss://' + location.host + '/ws/master', 'iconograph-master');
|
||||
ws.addEventListener('message', (e) => {
|
||||
let parsed = JSON.parse(e.data);
|
||||
console.log(parsed);
|
||||
});
|
||||
});
|
||||
@@ -1 +1,7 @@
|
||||
test
|
||||
<html>
|
||||
<head>
|
||||
<script src="/static/control.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user