From a69bfe11fe449afad31e6931f03e9c650646a1a8 Mon Sep 17 00:00:00 2001 From: Vincent Composieux Date: Fri, 10 Mar 2017 09:40:13 +0100 Subject: [PATCH] Move documentation --- .travis.yml | 1 + README.md | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 15e05d5..c1786ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,5 +12,6 @@ go: install: - go get github.com/flosch/pongo2 + - go get golang.org/x/net/http2 script: go test -v diff --git a/README.md b/README.md index 95bc1f4..6899628 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Installation ```bash $ git clone git@github.com:eko/gofast.git $ go get -u github.com/flosch/pongo2 +$ go get -u golang.org/x/net/http2 ``` Running an application @@ -77,6 +78,17 @@ func main() { } ``` +HTTP/2 Support +-------------- + +You can use HTTP/2 support by using the following line instead of app.Listen(): + +``` +app.ListenHttp2("./fullchain.pem", "./privkey.pem") +``` + +Of course, you will have to precize SSL certificate and private key. + Templating ---------- @@ -155,14 +167,3 @@ app.Get("retrieve-data", "/retrieve$", func(context gofast.Context) { fmt.Fprint(response, "{result: 200}") }) ``` - -HTTP/2 Support --------------- - -You can use HTTP/2 support by using the following line instead of app.Listen(): - -``` -app.ListenHttp2("./fullchain.pem", "./privkey.pem") -``` - -Of course, you will have to precize SSL certificate and private key.