A drag-and-drop task list built with Go, htmx, and SortableJS. Tasks within a list can be reordered by dragging, and the new order is persisted to PostgreSQL.
- muxt — template-driven HTTP routing
- htmx + SortableJS — drag-and-drop reordering without a JS framework
- sqlc — type-safe SQL queries
- pgx — PostgreSQL driver
Set the DATABASE_URL environment variable and run:
go run github.com/typelate/sortable-example/cmd/serverThe server listens on PORT (default 8080).
Goose-like migrations run automatically on startup.
Unit tests (no database required):
go test ./...Integration tests in internal/database require a running PostgreSQL instance reachable via DATABASE_URL. They are skipped automatically when the database is unavailable.
MIT