move to templ

This commit is contained in:
bronku 2026-06-11 08:48:01 +02:00
parent 31a33cc220
commit bb32802324
34 changed files with 1011 additions and 528 deletions

View file

@ -1,5 +1,7 @@
package main
//go:generate go tool templ generate
import (
"log"
"net/http"
@ -12,9 +14,9 @@ import (
func main() {
s := store.OpenStore("./foo.db")
defer s.Close()
h := server.New(s)
defer h.Close()
var h http.Handler = server.New(s)
h = logging.Middleware(h)
log.Println("starting server")
log.Fatal(http.ListenAndServe(":8080", logging.Middleware(h)))
log.Fatal(http.ListenAndServe(":8080", h))
}