Skip to content

Commit d14fefc

Browse files
authored
Merge pull request #5 from datacite/add-logging
log error from server initialization
2 parents 9294dde + 570f589 commit d14fefc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ func main() {
2222

2323
log.Println("Starting API server...")
2424
http.HandleFunc("/", getData)
25-
http.ListenAndServe(":"+APIPort, nil)
26-
log.Println("Listening on port " + APIPort)
25+
err := http.ListenAndServe(":"+APIPort, nil)
26+
log.Fatalf("Error starting server: %s", err)
2727
}
2828

2929
func getData(response http.ResponseWriter, request *http.Request) {

0 commit comments

Comments
 (0)