From 53e4b1acf933b24447eb325b27c590a795e74e4d Mon Sep 17 00:00:00 2001 From: raul Date: Wed, 8 May 2024 10:47:41 +0200 Subject: [PATCH] Fix gin only listening on localhost --- cmd/serverFunc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/serverFunc.go b/cmd/serverFunc.go index 4e6215d..3308c4b 100644 --- a/cmd/serverFunc.go +++ b/cmd/serverFunc.go @@ -16,7 +16,7 @@ func server() { router := gin.Default() router.GET("/api/valencia", returnWeather) fmt.Printf("Listening on port %v...\n", listenPort) - router.Run("localhost:" + listenPort) + router.Run(":" + listenPort) } func returnWeather(c *gin.Context) {