MCPcopy
hub / github.com/gotify/server / main

Function main

app.go:26–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24)
25
26func main() {
27 vInfo := &model.VersionInfo{Version: Version, Commit: Commit, BuildDate: BuildDate}
28 mode.Set(Mode)
29
30 fmt.Println("Starting Gotify version", vInfo.Version+"@"+BuildDate)
31 conf := config.Get()
32
33 if conf.PluginsDir != "" {
34 if err := os.MkdirAll(conf.PluginsDir, 0o755); err != nil {
35 panic(err)
36 }
37 }
38 if err := os.MkdirAll(conf.UploadedImagesDir, 0o755); err != nil {
39 panic(err)
40 }
41
42 db, err := database.New(conf.Database.Dialect, conf.Database.Connection, conf.DefaultUser.Name, conf.DefaultUser.Pass, conf.PassStrength, true)
43 if err != nil {
44 panic(err)
45 }
46 defer db.Close()
47
48 engine, closeable := router.Create(db, vInfo, conf)
49 defer closeable()
50
51 if err := runner.Run(engine, conf); err != nil {
52 fmt.Println("Server error: ", err)
53 os.Exit(1)
54 }
55}

Callers

nothing calls this directly

Calls 6

SetFunction · 0.92
GetFunction · 0.92
NewFunction · 0.92
CreateFunction · 0.92
RunFunction · 0.92
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…