package main

import (
	"log"

	"pocketbase/custom"

	"github.com/pocketbase/pocketbase"
	"github.com/pocketbase/pocketbase/core"
)

func main() {
	app := pocketbase.New()

	app = custom.ExtendApp(app)

	app.OnServe().BindFunc(func(se *core.ServeEvent) error {

		custom.LoadCustomCode(app, se)

		return se.Next()
	})

	if err := app.Start(); err != nil {
		log.Fatal(err)
	}
}
