diff --git a/main.go b/main.go index 1e47927..05994c1 100644 --- a/main.go +++ b/main.go @@ -2,9 +2,15 @@ package main import ( "fmt" - _ "net/http" + "log" + "net/http" ) func main() { - fmt.Println("Hello HTTP") + http.HandleFunc("/hello", HelloHTTP) + log.Fatal(http.ListenAndServe(":8080", nil)) +} + +func HelloHTTP(w http.ResponseWriter, req *http.Request) { + fmt.Fprint(w, "Hello HTTP") }