GinPing is a small middleware library for Gin to add health check routes.
To enable a default /health
route:
ginping.Add(r)
Example:
package main
import (
"github.com/epomatti/gin-ping"
"github.com/gin-gonic/gin"
)
func main() {
r := gin.Default()
ginping.Add(r)
r.Run()
}
Testing locally with curl localhost:8080/health
should return the response OK
.