diff --git a/pb/pb.go b/pb/pb.go index b1c13b6..31f2c72 100644 --- a/pb/pb.go +++ b/pb/pb.go @@ -1,36 +1,18 @@ package pb import ( - "net/http" - - "github.com/labstack/echo/v5" - "github.com/pocketbase/pocketbase" - "github.com/pocketbase/pocketbase/apis" - "github.com/pocketbase/pocketbase/core" "github.com/charmbracelet/log" + "github.com/pocketbase/pocketbase" ) func Run() { - app := pocketbase.New() + app := pocketbase.New() - app.OnBeforeServe().Add(func(e *core.ServeEvent) error { - // add new "GET /hello" route to the app router (echo) - e.Router.AddRoute(echo.Route{ - Method: http.MethodGet, - Path: "/hello", - Handler: func(c echo.Context) error { - return c.String(200, "Hello world!") - }, - Middlewares: []echo.MiddlewareFunc{ - apis.ActivityLogger(app), - }, - }) + // Start the PocketBase server in a goroutine. + func() { + if err := app.Start(); err != nil { + log.Fatal(err) + } + }() - return nil - }) - - - if err := app.Start(); err != nil { - log.Fatal(err) - } -} \ No newline at end of file +} diff --git a/pb_data/logs.db b/pb_data/logs.db index 90e6087..411f8c8 100644 Binary files a/pb_data/logs.db and b/pb_data/logs.db differ