Skip to content

Commit

Permalink
wrap serve with log.fatal for visible failures (#9)
Browse files Browse the repository at this point in the history
This closes #8 and implements a minor cleanup.
  • Loading branch information
suyashkumar authored Nov 9, 2018
1 parent a4f05cd commit 7f96480
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ func main() {
TLSConfig: m.TLSConfig(),
}
s.Handler = mux
s.ListenAndServeTLS("", "")
} else {
log.Fatal(http.ListenAndServeTLS(*fromURL, *certFile, *keyFile, mux))
log.Fatal(s.ListenAndServeTLS("", ""))
}

// Domain is not provided, serve using provided/generated certificate files
log.Fatal(http.ListenAndServeTLS(*fromURL, *certFile, *keyFile, mux))

}

0 comments on commit 7f96480

Please sign in to comment.