Created
March 29, 2021 10:19
-
-
Save techno-tanoC/e7005fd9f46536e787a896a0fc135476 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" | |
"time" | |
) | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { | |
time.Sleep(5 * time.Second) | |
fmt.Fprintf(w, "Hello World!") | |
}) | |
http.ListenAndServe("0.0.0.0:8000", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
go run timeout_server.go