Directory Layout
Core Files
app/server/app.go
app/server/routes.go
handler/counter.go
assets/js/live.js
views/pages/counter.html
Message Flow
- Page Load - Server renders initial HTML
- WebSocket Connect - Client connects to
/ws - User Action - Button click calls
live.send() - Server Receives -
OnMessagehandler processes - Server Sends - New HTML sent back
- DOM Update - Client replaces content
Next Steps
Tutorial
Build a real-time chat
Live Docs
Deep dive into live views