summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-01-08 19:27:47 +0100
committerxengineering <me@xengineering.eu>2024-01-08 19:33:24 +0100
commit43e7bb10eaade56a9444ec089aa3102218231868 (patch)
tree259e52b1978cfdf7ff979b0614c545d24d957c88 /main.go
parentc6d2e9dadcd08cdf82aab507d9d4d8d58574df20 (diff)
downloadceres-43e7bb10eaade56a9444ec089aa3102218231868.tar
ceres-43e7bb10eaade56a9444ec089aa3102218231868.tar.zst
ceres-43e7bb10eaade56a9444ec089aa3102218231868.zip
Implement recipe page
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.go b/main.go
index 0d84eef..e7acac1 100644
--- a/main.go
+++ b/main.go
@@ -44,6 +44,8 @@ func startServer(addr string) *http.Server {
r.PathPrefix("/static/").
Handler(http.StripPrefix("/static/", http.FileServer(http.FS(static))))
+ r.HandleFunc("/recipes/{id}", view.HandlerHTML(&model.Recipe{})).Methods(`GET`)
+
r.HandleFunc("/", view.HandlerHTML(&model.Index{})).Methods(`GET`)
muxer := http.NewServeMux()