geo-smart-system/public/index.html

18 lines
323 B
HTML
Raw Normal View History

2019-10-27 16:34:34 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<p id="test"></p>
<body>
<script>
const id = document.getElementById("test");
const stream = new EventSource("/stream");
stream.onmessage = function (event) {
id.innerText = event.data
};
</script>
</body>
</html>