);
-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")
+}