add route for health-check
This commit is contained in:
parent
e2dcb47901
commit
a52545a0c2
1 changed files with 5 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"html/template"
|
"html/template"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
|
|
@ -44,6 +45,10 @@ func main() {
|
||||||
|
|
||||||
e.GET("/", pages.Index)
|
e.GET("/", pages.Index)
|
||||||
|
|
||||||
|
e.GET("/service/health-check", func(c echo.Context) error {
|
||||||
|
return c.NoContent(http.StatusOK)
|
||||||
|
})
|
||||||
|
|
||||||
port := os.Getenv("PORT")
|
port := os.Getenv("PORT")
|
||||||
if port == "" {
|
if port == "" {
|
||||||
port = "5173"
|
port = "5173"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue