diff --git a/main.go b/main.go new file mode 100644 index 0000000..7c8a196 --- /dev/null +++ b/main.go @@ -0,0 +1,20 @@ +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) +}