Files

17 lines
790 B
Go
Raw Permalink Normal View History

2026-07-16 10:13:46 +03:30
// Package handlers contains all HTTP handlers - the functions/methods that
// actually receive a request and write a response. Handlers are kept thin:
// they parse input, call into repositories/other packages to do real work,
// and format the output. Business logic that isn't purely "HTTP plumbing"
// generally belongs elsewhere (e.g. in the models package).
package handlers
import "net/http"
// Health is a simple liveness check endpoint: GET /health.
// Useful for load balancers, container orchestrators (Docker/Kubernetes),
// and uptime monitors to confirm the process is up and responding, without
// needing to touch the database or any other dependency.
func Health(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, map[string]string{"status": "ok"})
}