Init the api

This commit is contained in:
2024-05-03 22:40:28 +02:00
parent a892bf04e7
commit 7f6fe3e350
4 changed files with 70 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package api
import (
"log"
"github.com/labstack/echo/v4"
)
type Handler struct{}
func (h *Handler) GetEntries(c echo.Context) error {
ret := make([]interface{}, 0)
return c.JSON(200, ret)
}
func main() {
h := Handler{}
e := echo.New()
e.GET("/entries", h.GetEntries)
log.Print("Listening on :1597")
e.Start(":1597")
}