This commit is contained in:
JurajKubrican
2025-01-10 23:46:36 +01:00
parent ca99429d79
commit 4b04531746
6 changed files with 107 additions and 91 deletions

View File

@@ -43,15 +43,12 @@ func main() {
e.Logger.SetLevel(log.DEBUG)
e.Use(middleware.Logger())
boxes := getBoxes()
e.GET("/health", healthCheck)
e.Static("/images", "images")
e.Static("/css", "css")
e.GET("/", func(c echo.Context) error {
return c.Render(200, "index", newPage(boxes))
return c.Render(200, "index", newPage(getBoxes()))
})
e.GET("/ws", initWs)