MCPcopy Index your code
hub / github.com/dnote/dnote / initApp

Function initApp

pkg/server/cmd/helpers.go:51–66  ·  view source on GitHub ↗
(cfg config.Config)

Source from the content-addressed store, hash-verified

49}
50
51func initApp(cfg config.Config) app.App {
52 db := initDB(cfg.DBPath)
53 emailBackend := getEmailBackend()
54
55 return app.App{
56 DB: db,
57 Clock: clock.New(),
58 EmailBackend: emailBackend,
59 HTTP500Page: cfg.HTTP500Page,
60 BaseURL: cfg.BaseURL,
61 DisableRegistration: cfg.DisableRegistration,
62 Port: cfg.Port,
63 DBPath: cfg.DBPath,
64 AssetBaseURL: cfg.AssetBaseURL,
65 }
66}
67
68// printFlags prints flags with -- prefix for consistency with CLI
69func printFlags(fs *flag.FlagSet) {

Callers 2

createAppFunction · 0.85
startCmdFunction · 0.85

Calls 3

NewFunction · 0.92
initDBFunction · 0.85
getEmailBackendFunction · 0.85

Tested by

no test coverage detected