Browse Source

Step 2

master step2
Levi Olson 6 years ago
parent
commit
ef1be6ff2a
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      main.go

+ 8
- 2
main.go View File

@ -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")
}

Loading…
Cancel
Save