1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 11:57:02 +00:00

examples: improve the server-sent events example with a table and javascript use...

Former-commit-id: 20a6dd0e62679b20fefb2f0a7819c158247a3ca1
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-08-03 01:59:19 +03:00
parent 5d9ded37c4
commit 21e90ac4c5
5 changed files with 58 additions and 37 deletions

View File

@@ -0,0 +1,17 @@
<!-- you can just put that to your favourite browser -->
<html>
<head>
<title>SSE (javascript side)</title>
<script type="text/javascript">
var client = new EventSource("http://localhost:8080/events")
client.onmessage = function (evt) {
console.log(evt)
}
</script>
</head>
<body>
<h1>Open the browser's console(F12) and watch for incoming event messages</h1>
</body>
</html>