From a52545a0c271ef5b637ec23fd925108ba8d52e4f Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Tue, 5 Mar 2024 00:39:22 -0500 Subject: [PATCH] add route for health-check --- cmd/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/main.go b/cmd/main.go index ce09fb1..cf9abf0 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -5,6 +5,7 @@ import ( "html/template" "io" "log" + "net/http" "os" "github.com/joho/godotenv" @@ -44,6 +45,10 @@ func main() { e.GET("/", pages.Index) + e.GET("/service/health-check", func(c echo.Context) error { + return c.NoContent(http.StatusOK) + }) + port := os.Getenv("PORT") if port == "" { port = "5173"