Created
May 15, 2016 00:57
-
-
Save janetkuo/063d667861a67a05ae4ea8779c501036 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" | |
) | |
// hello world, the web server | |
func HelloServer(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprintf(w, "Hello, world!") | |
} | |
func main() { | |
http.HandleFunc("/hello", HelloServer) | |
http.ListenAndServe(":12345", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are beautiful