Skip to content

Instantly share code, notes, and snippets.

@TvdW
Created October 16, 2019 10:24
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 TvdW/d90c1b6d69d140e274b8d0eb7788e623 to your computer and use it in GitHub Desktop.
Save TvdW/d90c1b6d69d140e274b8d0eb7788e623 to your computer and use it in GitHub Desktop.
package main
import (
"net/http"
)
func main() {
srv := &http.Server{Addr: ":443", Handler: http.HandlerFunc(handle)}
srv.ListenAndServeTLS("fullchain.pem", "privkey.pem")
}
func handle(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(200)
w.(http.Flusher).Flush()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment