(c *cli.Context)
| 27 | ) |
| 28 | |
| 29 | func 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 | } |
nothing calls this directly
no test coverage detected