Created
February 21, 2015 15:33
-
-
Save teaplanet/d4eaa3147384bc251aa1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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