Initial commit

This commit is contained in:
mathias
2026-05-27 21:55:18 +00:00
commit d1193a57c6
23 changed files with 730 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
package web
import (
"context"
"net/http"
)
func NewHandler() http.Handler {
mux := http.NewServeMux()
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
_ = Index().Render(context.Background(), w)
})
mux.HandleFunc("/api/hello", func(w http.ResponseWriter, r *http.Request) {
_ = Hello("world").Render(context.Background(), w)
})
return mux
}