Implent SSE feed

This commit is contained in:
Elnu 2023-07-17 10:11:26 -07:00
parent 3a8179a99a
commit b5ca22cd7d
2 changed files with 2 additions and 3 deletions

View file

@ -7,8 +7,7 @@
<script src="https://unpkg.com/htmx.org@1.9.3"></script>
</head>
<body>
<div hx-sse="connect:/api/counter">
<div hx-sse="swap:count"></div>
<div hx-sse="connect:/api/counter swap:count" hx-swap="beforebegin">
</div>
<button hx-get="/api/click1" hx-swap="innerHTML">Click me!</button>
<br>