move to templ
This commit is contained in:
parent
31a33cc220
commit
bb32802324
34 changed files with 1011 additions and 528 deletions
8
main.go
8
main.go
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue