Initial commit.

This commit is contained in:
Travis
2012-12-30 19:21:31 -08:00
commit 92623001b5
8 changed files with 345 additions and 0 deletions

21
helloserver.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"fmt"
"github.com/gorilla/mux"
"log"
"net/http"
)
func main() {
r := mux.NewRouter()
r.HandleFunc("/", Hello)
http.Handle("/", r)
log.Fatal(http.ListenAndServe(":8081", nil))
}
func Hello(w http.ResponseWriter, req *http.Request) {
fmt.Fprintln(w, "Hello world!")
}