MCPcopy
hub / github.com/pocketbase/pocketbase / main

Function main

examples/base/main.go:19–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17)
18
19func main() {
20 app := pocketbase.New()
21
22 // ---------------------------------------------------------------
23 // Optional plugin flags:
24 // ---------------------------------------------------------------
25
26 var hooksDir string
27 app.RootCmd.PersistentFlags().StringVar(
28 &hooksDir,
29 "hooksDir",
30 "",
31 "the directory with the JS app hooks",
32 )
33
34 var hooksWatch bool
35 app.RootCmd.PersistentFlags().BoolVar(
36 &hooksWatch,
37 "hooksWatch",
38 true,
39 "auto restart the app on pb_hooks file change; it has no effect on Windows",
40 )
41
42 var hooksPool int
43 app.RootCmd.PersistentFlags().IntVar(
44 &hooksPool,
45 "hooksPool",
46 15,
47 "the total prewarm goja.Runtime instances for the JS app hooks execution",
48 )
49
50 var migrationsDir string
51 app.RootCmd.PersistentFlags().StringVar(
52 &migrationsDir,
53 "migrationsDir",
54 "",
55 "the directory with the user defined migrations",
56 )
57
58 var automigrate bool
59 app.RootCmd.PersistentFlags().BoolVar(
60 &automigrate,
61 "automigrate",
62 true,
63 "enable/disable auto migrations",
64 )
65
66 var publicDir string
67 app.RootCmd.PersistentFlags().StringVar(
68 &publicDir,
69 "publicDir",
70 defaultPublicDir(),
71 "the directory to serve static files",
72 )
73
74 var indexFallback bool
75 app.RootCmd.PersistentFlags().BoolVar(
76 &indexFallback,

Callers

nothing calls this directly

Calls 12

NewFunction · 0.92
MustRegisterFunction · 0.92
MustRegisterFunction · 0.92
MustRegisterFunction · 0.92
StaticFunction · 0.92
defaultPublicDirFunction · 0.85
HasRouteMethod · 0.80
GETMethod · 0.80
OnServeMethod · 0.65
NextMethod · 0.65
BindMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…