Learn how to push live updates to your website using Go, SSE, and htmx. SSE endpoints in Go are slightly different from HTTP endpoints because you don't just write data to the ResponseWriter and return from the function. The connection stays alive until the client (the browser) closes it.
Table of contents
Server-Sent EventsGo With The Domain Three Dots LabsThe Microblog ExampleDeciding what and when to pushImplementing SSE EndpointsHigh-level architecture overviewPublishing eventsSubscribing to eventsSSE RouterhtmxOther things to considerLocal environment tricksGo build something!Sort: