diff --git a/backend/main.go b/backend/main.go index c90c5b0..d152ec8 100644 --- a/backend/main.go +++ b/backend/main.go @@ -22,8 +22,7 @@ import ( func main() { if err := run(); err != nil { - // TODO: handle this - panic(err) + fmt.Fprintf(os.Stderr, "error while running the app: %s\n", err.Error()) } } @@ -119,7 +118,9 @@ func run() error { // Compress responses n.Use(gzip.Gzip(gzip.DefaultCompression)) n.UseHandler(env.Router) - n.Run(":" + cf.Port) - return nil + addr := ":" + cf.Port + env.Log.Infof("listening on %s", addr) + + return http.ListenAndServe(addr, n) }