geo-smart-system/public/index.html
2019-10-27 23:34:34 +07:00

18 lines
323 B
HTML

<!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>