actually handle any http server errors

This commit is contained in:
Lilian Jónsdóttir 2024-01-27 16:25:17 -08:00
parent 177556399d
commit d771ddb3d3

View file

@ -29,6 +29,9 @@ func main() {
}
// and finally, start the server
app.Logger.Printf("Listening on port %d", app.ListenPort)
srv.ListenAndServe()
app.Logger.Printf("Starting HTTP Server on port %d", app.ListenPort)
err := srv.ListenAndServe()
if err != nil {
app.Logger.Fatal("Failed to start HTTP Server!", "err", err)
}
}