Skip to content

Instantly share code, notes, and snippets.

@teaplanet
Created February 21, 2015 15:33
Show Gist options
  • Save teaplanet/d4eaa3147384bc251aa1 to your computer and use it in GitHub Desktop.
Save teaplanet/d4eaa3147384bc251aa1 to your computer and use it in GitHub Desktop.
package app
import (
"fmt"
"net/http"
"github.com/codegangsta/negroni"
"github.com/julienschmidt/httprouter"
)
func init() {
router := httprouter.New()
router.GET("/", func(w http.ResponseWriter, req *http.Request, _ httprouter.Params) {
fmt.Fprintln(w, "Hello")
})
app := negroni.Classic()
app.UseHandler(router)
http.Handle("/", app)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment