mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-28 17:25:27 +00:00
16 lines
307 B
Go
16 lines
307 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)
|
|
}
|