From f90fa8275b423dac0b85c04c65ec457830932045 Mon Sep 17 00:00:00 2001 From: Tim Williams Date: Mon, 4 Jun 2018 15:56:26 -0400 Subject: [PATCH] add logs for the http server --- blockExplorerApi/app.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blockExplorerApi/app.go b/blockExplorerApi/app.go index c1334fe903..9047b1d3aa 100644 --- a/blockExplorerApi/app.go +++ b/blockExplorerApi/app.go @@ -12,5 +12,7 @@ import ( func main() { router := NewRouter() - log.Fatal(http.ListenAndServe(":8080", handlers.CORS(handlers.AllowedHeaders([]string{"X-Requested-With", "Content-Type", "Authorization"}), handlers.AllowedMethods([]string{"GET", "POST", "PUT", "HEAD", "OPTIONS"}), handlers.AllowedOrigins([]string{"*"}))(router))) + port := "8080" + log.Printf("Listening on port " + " " + port) + log.Fatal(http.ListenAndServe(":"+port, handlers.CORS(handlers.AllowedHeaders([]string{"X-Requested-With", "Content-Type", "Authorization"}), handlers.AllowedMethods([]string{"GET", "POST", "PUT", "HEAD", "OPTIONS"}), handlers.AllowedOrigins([]string{"*"}))(router))) }