mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-14 07:57:44 +00:00
16 lines
303 B
Go
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)
|
|
}
|