Phase 0.4: Add web dependencies (router, templating, HTMX) #5

Open
opened 2026-06-07 22:43:35 -06:00 by ppreeper · 0 comments
Owner

Description

Set up the web framework dependencies for the Go web server.

Approach

  • HTTP Router: Use Go 1.22+ std net/http with new routing patterns (or chi router)
  • HTML Templates: Use html/template (stdlib) or templ (type-safe Go->HTML)
  • HTMX: Include HTMX for dynamic page updates without JS frameworks
  • SSE: Stdlib net/http supports SSE natively (flush chunks)

Tasks

  • Add chosen dependencies to go.mod
  • Set up a basic main.go that starts an HTTP server
  • Create a health-check endpoint (GET /health)
  • Set up template rendering engine
  • Serve HTMX + static assets
  • Write a trivial index.html to prove the stack works

Acceptance Criteria

  • go run starts a web server on a configurable port
  • Browser at http://localhost:8080 shows a page
  • Hot reload works (or at least fast rebuild)
## Description Set up the web framework dependencies for the Go web server. ## Approach - **HTTP Router**: Use Go 1.22+ std `net/http` with new routing patterns (or `chi` router) - **HTML Templates**: Use `html/template` (stdlib) or `templ` (type-safe Go->HTML) - **HTMX**: Include HTMX for dynamic page updates without JS frameworks - **SSE**: Stdlib `net/http` supports SSE natively (flush chunks) ## Tasks - [ ] Add chosen dependencies to `go.mod` - [ ] Set up a basic `main.go` that starts an HTTP server - [ ] Create a health-check endpoint (`GET /health`) - [ ] Set up template rendering engine - [ ] Serve HTMX + static assets - [ ] Write a trivial `index.html` to prove the stack works ## Acceptance Criteria - `go run` starts a web server on a configurable port - Browser at `http://localhost:8080` shows a page - Hot reload works (or at least fast rebuild)
ppreeper added this to the Phase 0 milestone 2026-06-07 22:50:12 -06:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ppreeper/bygfoot#5
No description provided.