From a141c31c694a2c61f445c6c9519f21c41c7a5d48 Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Mon, 9 May 2016 10:59:38 +0200 Subject: [PATCH] add usage instructions to readme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 7a48f597..6fecbd2f 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,15 @@ Using the `quic_client` from chromium: Using Chrome (currently does not work due to version mismatch): /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/chrome --no-proxy-server --enable-quic --origin-to-force-quic-on=quic.clemente.io:443 --host-resolver-rules='MAP quic.clemente.io:443 127.0.0.1:6121' https://quic.clemente.io + +## Usage + +See the [example server](example/main.go) or our [fork](https://github.com/lucas-clemente/caddy) of caddy. Starting a QUIC server is very similar to the standard lib http in go: + +```go +http.Handle("/", http.FileServer(http.Dir(wwwDir))) + +server, _ := h2quic.NewServer(tlsConfig) + +server.ListenAndServe("localhost:4242", nil /* use http.DefaultServeMux */) +```