go-kit/web/routes.go

18 lines
413 B
Go
Raw Normal View History

2024-05-10 02:24:08 +00:00
// Package web provides the web server for the application.
package web
import (
"fmt"
"net/http"
)
// Routes sets up the routes for the server.
func (s *Server) Routes() {
s.Log.Info("Health check handler installed")
s.AddRoute("GET /health", func(w http.ResponseWriter, r *http.Request) {
s.Log.Debug("Health check handler called")
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "Hello, World!")
})
}