Lots of changes to web package

Use go-bindata, html/templates, and lots of other changes to the web
package.
This commit is contained in:
2016-07-17 16:16:59 +01:00
parent 2e84c00707
commit 68807898da
12 changed files with 567 additions and 107 deletions

12
web/server.go Normal file
View File

@@ -0,0 +1,12 @@
package web
import (
"github.com/jimeh/ozu.io/shortener"
"github.com/valyala/fasthttp"
)
// NewServer returns a new fasthttp.Server with all routes configured.
func NewServer(s shortener.Shortener) *fasthttp.Server {
r := NewRouter(s)
return &fasthttp.Server{Handler: r.HandleRequest}
}