diff --git a/examples/base/main.go b/examples/base/main.go index 04b452be..3e5e2861 100644 --- a/examples/base/main.go +++ b/examples/base/main.go @@ -2,6 +2,7 @@ package main import ( "log" + "path/filepath" "github.com/labstack/echo/v5" "github.com/pocketbase/pocketbase" @@ -14,7 +15,7 @@ func main() { app.OnBeforeServe().Add(func(e *core.ServeEvent) error { // serves static files from the provided public dir (if exists) - subFs := echo.MustSubFS(e.Router.Filesystem, "pb_public") + subFs := echo.MustSubFS(e.Router.Filesystem, filepath.Join(app.DataDir(), "../pb_public")) e.Router.GET("/*", apis.StaticDirectoryHandler(subFs, false)) return nil