Files
catalyst/app/bootstrap.go
2024-07-20 06:39:02 +02:00

26 lines
444 B
Go

package app
import (
"github.com/pocketbase/pocketbase/core"
"github.com/spf13/cobra"
)
func Bootstrap(app core.App) error {
if err := app.Bootstrap(); err != nil {
return err
}
return MigrateDBs(app)
}
func bootstrapCmd(app core.App) *cobra.Command {
return &cobra.Command{
Use: "bootstrap",
Run: func(_ *cobra.Command, _ []string) {
if err := Bootstrap(app); err != nil {
app.Logger().Error(err.Error())
}
},
}
}