Skip to content

Instantly share code, notes, and snippets.

@andreadipersio
Created November 15, 2013 15:33
Show Gist options
  • Save andreadipersio/7486195 to your computer and use it in GitHub Desktop.
Save andreadipersio/7486195 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"log"
"net/http"
)
func rootHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello, world!")
}
func main() {
http.HandleFunc("/", rootHandler)
log.Fatal(http.ListenAndServe(":8080", nil))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment