aboutsummaryrefslogtreecommitdiff
path: root/backend/router.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-02 17:21:21 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-02 17:21:21 +0200
commita471baf6ee1b1a05acec23f2de1b74f56f4596a5 (patch)
tree40012fd384e01c8365554daca6ccdf6c76bb8d9a /backend/router.go
parent5bfd611e7b3468ae38263388e2415d4bba94b0fc (diff)
feat(backend): handle home
Diffstat (limited to 'backend/router.go')
-rw-r--r--backend/router.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/backend/router.go b/backend/router.go
index f5d0cc6..b1efea8 100644
--- a/backend/router.go
+++ b/backend/router.go
@@ -11,18 +11,15 @@ import (
"github.com/go-chi/chi/v5/middleware"
)
+//go:embed templates
+var templates embed.FS
+
func NewRouter() *chi.Mux {
r := chi.NewRouter()
r.Use(middleware.Timeout(30 * time.Second))
r.Use(middleware.Logger)
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- _, err := w.Write([]byte("Hello World"))
- if err != nil {
- panic(err)
- }
- })
return r
}