Add healthcheck endpoints and scripts

This commit is contained in:
sid palas
2023-02-05 10:16:47 -05:00
parent af4bca05d0
commit 1ea6754c7f
14 changed files with 241 additions and 20 deletions

View File

@ -42,5 +42,11 @@ func main() {
"now": tm,
})
})
r.Run() // listen and serve on 0.0.0.0:8080
r.GET("/ping", func(c *gin.Context) {
tm = database.GetTime(c)
c.JSON(200, "pong")
})
r.Run() // listen and serve on 0.0.0.0:8080 (or "PORT" env var)
}