rrevo commited on
Commit
5008097
·
1 Parent(s): 7a3c7e3
Files changed (1) hide show
  1. display/index.html +6 -2
display/index.html CHANGED
@@ -10,8 +10,12 @@
10
 
11
  <script>
12
  window.onload = () => {
13
- const eventSource = new EventSource('/stream');
14
-
 
 
 
 
15
  }
16
  </script>
17
  </body>
 
10
 
11
  <script>
12
  window.onload = () => {
13
+ const eventSource = new EventSource('http://126.0.0.1:5555/test');
14
+ eventSource.onmessage = (event) => {
15
+ console.log("event", event);
16
+ const data = JSON.parse(event.data);
17
+ document.body.innerHTML = data.text;
18
+ };
19
  }
20
  </script>
21
  </body>