add route for health-check

This commit is contained in:
jc 2024-03-05 00:39:22 -05:00
commit a52545a0c2
No known key found for this signature in database

View file

@ -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"