Skip to content

Instantly share code, notes, and snippets.

@kelseyhightower
Created December 1, 2014 06:34
Show Gist options
  • Save kelseyhightower/3b9fb95a303fa95946df to your computer and use it in GitHub Desktop.
Save kelseyhightower/3b9fb95a303fa95946df to your computer and use it in GitHub Desktop.
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