From 62e735a0ff2a05c5455abc1f27d1d14167158175 Mon Sep 17 00:00:00 2001 From: xengineering <me@xengineering.eu> Date: Thu, 15 Feb 2024 19:43:36 +0100 Subject: view: Add index handler --- main.go | 1 + 1 file changed, 1 insertion(+) (limited to 'main.go') diff --git a/main.go b/main.go index c7a6871..2f398b3 100644 --- a/main.go +++ b/main.go @@ -45,6 +45,7 @@ func startServer(addr string) *http.Server { Handler(http.StripPrefix("/static/", http.FileServer(http.FS(static)))) r.HandleFunc("/recipes", view.Recipes).Methods(`GET`) r.HandleFunc("/recipe/{id:[0-9]+}", view.Recipe).Methods(`GET`) + r.HandleFunc("/", view.Index).Methods(`GET`) muxer := http.NewServeMux() muxer.Handle("/", r) -- cgit v1.2.3-70-g09d2