From 7b66ba8ba3580608550fe5bdaf1ef68a08bfa3fd Mon Sep 17 00:00:00 2001 From: Levi Olson Date: Thu, 3 Jan 2019 13:34:52 -0600 Subject: [PATCH] HTTPS --- main.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 73abfd6..634097a 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,7 @@ import ( "os" "strconv" - "github.com/fvbock/endless" + "github.com/gin-gonic/autotls" "github.com/gin-gonic/gin" ) @@ -43,10 +43,7 @@ func main() { c.JSON(http.StatusOK, gin.H{"weather": response}) }) - err := endless.ListenAndServe("0.0.0.0:80", router) - if err != nil { - log.Fatalf("Error: %s\n", err) - } + log.Fatal(autotls.Run(router, "weather.l3vi.co")) } func currentWeather(lat, long float64, apikey string) (ForecastResponse, error) {