aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/api/routes.go
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-03-11 18:59:56 +0000
committerMatthew Lemon <y@yulqen.org>2024-03-11 18:59:56 +0000
commit86c012d7a7155ba3f935897e00f594a6bac9786a (patch)
tree3f6bed861d6ef319d36dbeb02b35ff2c53e6657d /cmd/api/routes.go
Initial commit
Diffstat (limited to 'cmd/api/routes.go')
-rw-r--r--cmd/api/routes.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/api/routes.go b/cmd/api/routes.go
new file mode 100644
index 0000000..acf13d0
--- /dev/null
+++ b/cmd/api/routes.go
@@ -0,0 +1,13 @@
+package main
+
+import "net/http"
+
+func (app *application) routes() *http.ServeMux {
+
+ mux := http.NewServeMux()
+
+ mux.HandleFunc("GET /v1/healthcheck", app.healthcheckHandler)
+ mux.HandleFunc("POST /v1/datamaps", app.createDatamapHandler)
+ mux.HandleFunc("GET /v1/datamaps/{id}", app.showDatamapHandler)
+ return mux
+}