summaryrefslogtreecommitdiff
path: root/pkg/web/server.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-04-11 09:42:38 -0600
committermo khan <mo@mokhan.ca>2025-04-11 09:42:38 -0600
commit6a2965c41d15fb8669892ec97e951794f76cb4d4 (patch)
tree9a02430550f34b150f39c7131e43cac10c7dcb6b /pkg/web/server.go
parentacdd82db1d8a25b837aa664e111efb11aa67b63b (diff)
feat: add health check endpoint
Diffstat (limited to 'pkg/web/server.go')
-rw-r--r--pkg/web/server.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/web/server.go b/pkg/web/server.go
index 2949309..e553920 100644
--- a/pkg/web/server.go
+++ b/pkg/web/server.go
@@ -23,6 +23,8 @@ func NewServer(storage db.Repository) *Server {
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
switch r.URL.String() {
+ case "/health":
+ w.WriteHeader(http.StatusOK)
case "/sparkles.json":
switch r.Method {
case "GET":