Created
February 25, 2015 13:14
-
-
Save yoggy/401f8e36d2a69d5ff9f0 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" | |
| ) | |
| func testHandler(w http.ResponseWriter, req *http.Request) { | |
| fmt.Fprintln(w, "/test handler") | |
| } | |
| func main() { | |
| http.HandleFunc("/test", testHandler) | |
| http.Handle("/", http.FileServer(http.Dir("./assets/"))) | |
| http.ListenAndServe(":8080", nil) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment