Skip to content

Commit

Permalink
feat: Add /api/health endpoint for server health check
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed May 8, 2024
1 parent a331102 commit b8e4c75
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/sentinel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import (
func main() {
// scheduler()
r := gin.Default()
r.GET("/", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "Hello, World!",
})
r.GET("/api/health", func(c *gin.Context) {
c.String(200, "ok")
})
r.GET("/api/containers", func(c *gin.Context) {
containers, err := getAllContainers()
Expand Down

0 comments on commit b8e4c75

Please sign in to comment.