2 parents 9294dde + 570f589 commit d14fefcCopy full SHA for d14fefc
1 file changed
main.go
@@ -22,8 +22,8 @@ func main() {
22
23
log.Println("Starting API server...")
24
http.HandleFunc("/", getData)
25
- http.ListenAndServe(":"+APIPort, nil)
26
- log.Println("Listening on port " + APIPort)
+ err := http.ListenAndServe(":"+APIPort, nil)
+ log.Fatalf("Error starting server: %s", err)
27
}
28
29
func getData(response http.ResponseWriter, request *http.Request) {
0 commit comments