feat: add handlers to serve template and styles

This commit is contained in:
Stevan Freeborn
2025-11-15 09:00:06 -06:00
parent b42c63532f
commit 03cbe49a30
10 changed files with 225 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
// Package middleware provides HTTP middleware for the web application.
package middleware
import (
"log"
"net/http"
"time"
)
func Logging(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
start := time.Now()
next.ServeHTTP(w, r)
log.Printf("%s %s %s", r.Method, r.RequestURI, time.Since(start))
})
}