Skip to content

Instantly share code, notes, and snippets.

@groob
Created April 30, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save groob/84322892d382833e119b to your computer and use it in GitHub Desktop.
Save groob/84322892d382833e119b to your computer and use it in GitHub Desktop.
package main
import (
"log"
"net/http"
"github.com/bradfitz/http2"
)
func main() {
var srv http.Server
srv.Addr = ":10443"
http2.ConfigureServer(&srv, &http2.Server{})
http.Handle("/", http.FileServer(http.Dir(".")))
log.Printf("About to listen on 10443. Go to https://127.0.0.1:10443/")
log.Fatal(srv.ListenAndServeTLS(
"localhost.crt", "localhost.key"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment