This sample project is a basic Go web server with server side rendered html. Dynamic components are enabled via html fragments sent over a websocket. On the client side the dom is updated via morphdom.
This approach is similar to Phoenix LiveView, Hotwire, and others.
Tailwind CSS is used for the basic styling and esbuild for bundling.
Start tailwind watcher.
npm run tailwindRun esbuild to bundle javascript
npm run esbuildRun go server
go run main.goIf you visit http://localhost:8080 you will see a timestamp that updates every second and the live number of connections. Open another instance in a different tab to see the connection count go up.