Created
April 4, 2017 06:33
-
-
Save phoorichet/3a62001a1e9fc84047385b922fe45531 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" | |
"log" | |
"net/http" | |
"time" | |
) | |
func main() { | |
addr := ":9000" | |
log.Printf("Starting simple http server on %s", addr) | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprintf(w, "timestamp: %s", time.Now()) | |
}) | |
log.Fatal(http.ListenAndServe(":9000", nil)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment