Skip to content

Instantly share code, notes, and snippets.

@techno-tanoC
Created March 29, 2021 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techno-tanoC/e7005fd9f46536e787a896a0fc135476 to your computer and use it in GitHub Desktop.
Save techno-tanoC/e7005fd9f46536e787a896a0fc135476 to your computer and use it in GitHub Desktop.
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)
}
@techno-tanoC
Copy link
Author

go run timeout_server.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment