fix(commands/web): return error from ListenAndServe

This commit is contained in:
Jordan Knott 2020-09-18 20:19:14 -05:00
parent 3d95c6b600
commit 058749cb17

View File

@ -75,8 +75,7 @@ func newWebCmd() *cobra.Command {
secret = uuid.New().String() secret = uuid.New().String()
} }
r, _ := route.NewRouter(db, []byte(secret)) r, _ := route.NewRouter(db, []byte(secret))
http.ListenAndServe(viper.GetString("server.hostname"), r) return http.ListenAndServe(viper.GetString("server.hostname"), r)
return nil
}, },
} }
cc.Flags().Bool("migrate", false, "if true, auto run's schema migrations before starting the web server") cc.Flags().Bool("migrate", false, "if true, auto run's schema migrations before starting the web server")