Skip to content

Commit

Permalink
Merge branch 'main' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
p-shubh committed Jul 29, 2024
2 parents d5d5dcf + 44503b5 commit 47f84e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ func main() {
config.AllowHeaders = []string{"Authorization", "Content-Type"}
ginApp.Use(cors.New(config))

// adding health check
ginApp.GET("/ping", func(c *gin.Context) {
c.JSON(200, gin.H{"status": "pong"})
})

ginApp.NoRoute(func(c *gin.Context) {
c.JSON(404, gin.H{"status": 404, "message": "Invalid Endpoint Request"})
})
Expand Down

0 comments on commit 47f84e1

Please sign in to comment.