From: Skullheadx Date: Sat, 16 May 2026 19:39:52 +0000 (-0400) Subject: organize main.go X-Git-Url: http://git.skullheadx.com/about.html?a=commitdiff_plain;h=a7e191b520546455da3ab59bf0053134ec794c27;p=monopoly-web.git organize main.go --- diff --git a/main.go b/main.go index 30841e7..d35d86b 100644 --- a/main.go +++ b/main.go @@ -9,13 +9,18 @@ import ( ); -func main() { - fmt.Println("monopoly-web") - healthHandler:= func(w http.ResponseWriter, req *http.Request) { - io.WriteString(w, "Status: healthy\n") - } +func main() { + fmt.Println("monopoly-web backend") + // register routes http.HandleFunc("/health", healthHandler) + + + // listen and serve log.Fatal(http.ListenAndServe(":8080",nil)) } + +func healthHandler(w http.ResponseWriter, req *http.Request) { + io.WriteString(w, "Status: healthy\n") +}