improved logging
This commit is contained in:
parent
9da0f355a9
commit
79059d79d3
1 changed files with 7 additions and 1 deletions
8
main.go
8
main.go
|
@ -40,7 +40,13 @@ func run() error {
|
|||
|
||||
mux.HandleFunc("GET /{$}", routes.Index(serviceList))
|
||||
|
||||
err = http.ListenAndServe(":3000", mux)
|
||||
address := os.Getenv("STATUS_ADDRESS")
|
||||
if address == "" {
|
||||
address = ":3000"
|
||||
}
|
||||
|
||||
log.Printf("Listening on %s", address)
|
||||
err = http.ListenAndServe(address, mux)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue