Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Wrong server URL in console #133

Closed
emmadal opened this issue Mar 20, 2025 · 2 comments
Closed

Wrong server URL in console #133

emmadal opened this issue Mar 20, 2025 · 2 comments

Comments

@emmadal
Copy link
Contributor

emmadal commented Mar 20, 2025

When we start the quick server, we have a wrong address in the console
for example

func main() {
	// Initialize a new Quick instance
	q := quick.New()

	q.Get("/", func(c *quick.Ctx) error {
		c.Set("Content-Type", "application/json")
		return c.Status(200).JSON(map[string]string{"message": "Quick in action ❤️!"})
	})

	/// Start the server on port 8080
	q.Listen(":4000")
}

we see in the console this url:

 Quick v0.0.1 🚀 Fast & Minimal Web Framework
─────────────────── ───────────────────────────────
 🌎 Host : http://127.0.0.1::4000
 📌 Port : :4000
 🔀 Routes: 1

and for this example of server:

func main() {
   // Initialize a new Quick instance
   q := quick.New()

   q.Get("/", func(c *quick.Ctx) error {
   	c.Set("Content-Type", "application/json")
   	return c.Status(200).JSON(map[string]string{"message": "Quick in action ❤️!"})
   })

   /// Start the server on port 8080
   q.Listen("0.0.0.0:4000")
}

we have this value in console:

 Quick v0.0.1 🚀 Fast & Minimal Web Framework
─────────────────── ───────────────────────────────
 🌎 Host : http://127.0.0.1:0.0.0.0:4000
 📌 Port : 0.0.0.0:4000
 🔀 Routes: 1

the PR has made here #132

@jeffotoni
Copy link
Owner

@emmadal I will improve this

@jeffotoni jeffotoni reopened this Mar 20, 2025
@jeffotoni
Copy link
Owner

fixed and beautiful again!!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants