From 5d8d5c6fde63d1d9dc83aca75d8bc4316afffda5 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Mon, 12 Feb 2024 17:20:42 +0100 Subject: [PATCH] Better feedback when starting server --- backend/cmd/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/cmd/main.go b/backend/cmd/main.go index 98fcc96..48d9a32 100644 --- a/backend/cmd/main.go +++ b/backend/cmd/main.go @@ -16,7 +16,6 @@ func handler(w http.ResponseWriter, r *http.Request) { } func main() { - println("Starting server...") database.DbConnect() // Mounting the handler @@ -25,6 +24,9 @@ func main() { http.HandleFunc("/hello", handler) // Start the server on port 8080 + println("Currently listening on http://localhost:8080") + println("Visit http://localhost:8080/hello to see the handler in action") + printlm("Press Ctrl+C to stop the server") err := http.ListenAndServe(":8080", nil) if err != nil { panic(err)