diff --git a/main.go b/main.go index 0370907..877eca6 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,11 @@ func handlerWrapper(f func(*http.Request) (interface{}, int)) func(http.Response } func main() { - client.Connect() + err := client.Connect() + if err != nil { + panic(err) + } + http.HandleFunc("/api/v1/metrics/endpoint", handlerWrapper(endpoint.AddEndpointMetric)) log.Printf("Server started") http.ListenAndServe(":1237", nil)