apollo-backend/internal/api/health.go
Andre Medeiros 993c07938c ALL THE API
2021-08-08 14:19:47 -04:00

16 lines
303 B
Go

package api
import (
"encoding/json"
"net/http"
)
func (a *api) healthCheckHandler(w http.ResponseWriter, r *http.Request) {
data := map[string]string{
"status": "available",
}
w.WriteHeader(http.StatusOK)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
}