mirror of
https://github.com/zoriya/vex.git
synced 2026-08-16 02:44:55 +00:00
Init the api
This commit is contained in:
+24
@@ -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")
|
||||
}
|
||||
Reference in New Issue
Block a user