Skip to content

Commit

Permalink
feat: Log server start error
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Oct 31, 2023
1 parent 9dce54f commit a883a50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,8 @@ func main() {

hostname, _ := os.Hostname()
Logger.Info().Str("hostname", hostname).Msg("Server started on 0.0.0.0:" + port + ", see http://127.0.0.1:" + port)
http.ListenAndServe("0.0.0.0:"+port, nil)
err := http.ListenAndServe("0.0.0.0:"+port, nil)
if err != nil {
Logger.Fatal().Str("hostname", hostname).Msg(err.Error())
}
}

0 comments on commit a883a50

Please sign in to comment.