MCPcopy
hub / github.com/pocketbase/pocketbase / New

Function New

pocketbase.go:73–79  ·  view source on GitHub ↗

New creates a new PocketBase instance with the default configuration. Use [NewWithConfig] if you want to provide a custom configuration. Note that the application will not be initialized/bootstrapped yet, aka. DB connections, migrations, app settings, etc. will not be accessible. Everything will be

()

Source from the content-addressed store, hash-verified

71// If you want to initialize the application before calling [PocketBase.Start],
72// then you'll have to manually call [PocketBase.Bootstrap].
73func New() *PocketBase {
74 _, isUsingGoRun := inspectRuntime()
75
76 return NewWithConfig(Config{
77 DefaultDev: isUsingGoRun,
78 })
79}
80
81// NewWithConfig creates a new PocketBase instance with the provided config.
82//

Callers 2

mainFunction · 0.92
TestNewFunction · 0.70

Calls 2

inspectRuntimeFunction · 0.85
NewWithConfigFunction · 0.85

Tested by 1

TestNewFunction · 0.56