MCPcopy
hub / github.com/pocketbase/pocketbase / Start

Method Start

pocketbase.go:166–172  ·  view source on GitHub ↗

Start starts the application, aka. registers the default system commands (serve, superuser, version) and executes pb.RootCmd.

()

Source from the content-addressed store, hash-verified

164// Start starts the application, aka. registers the default system
165// commands (serve, superuser, version) and executes pb.RootCmd.
166func (pb *PocketBase) Start() error {
167 // register system commands
168 pb.RootCmd.AddCommand(cmd.NewSuperuserCommand(pb))
169 pb.RootCmd.AddCommand(cmd.NewServeCommand(pb, !pb.hideStartBanner))
170
171 return pb.Execute()
172}
173
174// Execute initializes the application (if not already) and executes
175// the pb.RootCmd with graceful shutdown support.

Callers

nothing calls this directly

Calls 3

ExecuteMethod · 0.95
NewSuperuserCommandFunction · 0.92
NewServeCommandFunction · 0.92

Tested by

no test coverage detected