summaryrefslogtreecommitdiff
path: root/cmd/web/handlers/routes.go
diff options
context:
space:
mode:
authorSamuel Johnson <[email protected]>2025-02-10 02:19:21 -0500
committerSamuel Johnson <[email protected]>2025-02-10 02:19:21 -0500
commit9de239a9badbbc075f1cc8079a6435f0780e5d26 (patch)
tree559f29f7c3a0213a4fd712f4f325f5f820e6ca79 /cmd/web/handlers/routes.go
But it was a beginningtrunk
Diffstat (limited to 'cmd/web/handlers/routes.go')
-rw-r--r--cmd/web/handlers/routes.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/web/handlers/routes.go b/cmd/web/handlers/routes.go
new file mode 100644
index 0000000..5a57440
--- /dev/null
+++ b/cmd/web/handlers/routes.go
@@ -0,0 +1,14 @@
+package handlers
+
+import (
+ "github.com/gorilla/mux"
+)
+
+func RegisterEndpoints(webmaster string) *mux.Router {
+ ctx := HandlerContext{webmaster}
+
+ blogRouter := mux.NewRouter()
+ blogRouter.HandleFunc("/", ctx.blogIndex)
+
+ return blogRouter
+}