MCPcopy
hub / github.com/writefreely/writefreely / serveAction

Function serveAction

cmd/writefreely/web.go:29–48  ·  view source on GitHub ↗
(c *cli.Context)

Source from the content-addressed store, hash-verified

27)
28
29func serveAction(c *cli.Context) error {
30 // Initialize the application
31 app := writefreely.NewApp(c.String("c"))
32 var err error
33 log.Info("Starting %s...", writefreely.FormatVersion())
34 app, err = writefreely.Initialize(app, c.Bool("debug"))
35 if err != nil {
36 return err
37 }
38
39 // Set app routes
40 r := mux.NewRouter()
41 writefreely.InitRoutes(app, r)
42 app.InitStaticRoutes(r)
43
44 // Serve the application
45 writefreely.Serve(app, r)
46
47 return nil
48}

Callers

nothing calls this directly

Calls 7

InitStaticRoutesMethod · 0.95
NewAppFunction · 0.92
FormatVersionFunction · 0.92
InitializeFunction · 0.92
InitRoutesFunction · 0.92
ServeFunction · 0.92
StringMethod · 0.80

Tested by

no test coverage detected