Created
July 26, 2014 19:57
-
-
Save jonathanmarvens/f772532bb2093522d92d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/codegangsta/negroni" | |
) | |
func main() { | |
mux := http.NewServeMux() | |
mux.HandleFunc("/", func(res http.ResponseWriter, req *http.Request) { | |
fmt.Fprintf(res, "Hello, world!") | |
}) | |
n := negroni.Classic() | |
n.UseHandler(mux) | |
n.Run(":3000") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment