Fix gin only listening on localhost

This commit is contained in:
raul 2024-05-08 10:47:41 +02:00
parent 6354a824f9
commit 53e4b1acf9
1 changed files with 1 additions and 1 deletions

View File

@ -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) {