aboutsummaryrefslogtreecommitdiff
path: root/internal/api/new.go
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-07-13 15:12:51 +0530
committerRanXom <saiyedshizain@gmail.com>2026-07-13 15:12:51 +0530
commit735e7310c904abf18293456d37044dd9c5e796b0 (patch)
tree19860e175604a1dbf3da5fe57f4db74161842dae /internal/api/new.go
parentcbad596b7825550b2e9cb1d6322f50acd7f1c9a7 (diff)
downloadgalleryd-735e7310c904abf18293456d37044dd9c5e796b0.tar.xz
galleryd-735e7310c904abf18293456d37044dd9c5e796b0.zip
feat(api): create a /health API endpoint
Diffstat (limited to 'internal/api/new.go')
-rw-r--r--internal/api/new.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/api/new.go b/internal/api/new.go
index a9a08eb..d225b02 100644
--- a/internal/api/new.go
+++ b/internal/api/new.go
@@ -10,9 +10,16 @@ func New(config Config) *Server {
Handler: mux,
}
- return &Server{
+ srv := &Server{
config: config,
mux: mux,
http: server,
}
+
+ srv.mux.HandleFunc(
+ "GET /health",
+ srv.handleHealth,
+ )
+
+ return srv
}