Initial commit: Homelab API

This commit is contained in:
Cosmo
2026-02-06 11:19:55 +00:00
commit 5a40127edd
26 changed files with 2807 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package handler
import (
"encoding/json"
"net/http"
)
type HealthHandler struct{}
func NewHealthHandler() *HealthHandler {
return &HealthHandler{}
}
func (h *HealthHandler) Health(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]string{
"status": "ok",
"service": "homelab-api",
})
}