Skip to content

Instantly share code, notes, and snippets.

@jordanorelli
Created August 4, 2012 17:00
Show Gist options
  • Save jordanorelli/3258777 to your computer and use it in GitHub Desktop.
Save jordanorelli/3258777 to your computer and use it in GitHub Desktop.
package main
import (
"io"
"log"
"net/http"
)
func hello(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "hello")
}
func main() {
http.HandleFunc("/", hello)
if err := http.ListenAndServe(":8000", nil); err != nil {
log.Fatal(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment