Created
August 10, 2015 09:24
-
-
Save sascha/24650389ea218e6e2c09 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 main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
const ( | |
port = ":8080" | |
) | |
func HelloWorld(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprintf(w, "Hello World") | |
} | |
func init() { | |
http.HandleFunc("/", HelloWorld) | |
http.ListenAndServe(port, nil) | |
} | |
func main() {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment