Created
December 1, 2014 06:34
-
-
Save kelseyhightower/3b9fb95a303fa95946df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { | |
log.Printf("request from %v\n", r.RemoteAddr) | |
w.Write([]byte("hello\n")) | |
}) | |
log.Fatal(http.ListenAndServe(":5000", nil)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment