16 lines
290 B
Go
16 lines
290 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// Health tries to respond that the server is alive.
|
|
// If it is not, the response won't reach the client.
|
|
func Health(writer http.ResponseWriter, _ *http.Request) {
|
|
writer.WriteHeader(http.StatusOK)
|
|
writeJson(
|
|
writer,
|
|
Message{"I'm alive!"},
|
|
)
|
|
}
|