1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 20:07:04 +00:00
Files
kararas_iris/_examples/http_responsewriter/server-side-events/optional.sse.js.html
Gerasimos (Makis) Maropoulos 2b72aadb15 add server side events via broker example (based on external resource but it is fairly good for a simple SSE showcase)
Former-commit-id: 926c2a88bf1c44354a99654bc85e267b940723b8
2018-07-31 03:12:16 +03:00

17 lines
421 B
HTML

<!-- 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")
client.onmessage = function (msg) {
console.log(msg)
}
</script>
</head>
<body>
<h1>Open the browser's console(F12) and watch for icoming event messages</h1>
</body>
</html>