package main import ( "fmt" "net/http" ) const port = ":5000" func Home(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello, World!") } func main() { http.HandleFunc("/", Home) fmt.Printf("Starting web server on http://localhost%s\n", port) _ = http.ListenAndServe(port, nil) }