mirror of
https://github.com/jimeh/ozu.io.git
synced 2026-02-19 08:06:39 +00:00
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:
12
web/server.go
Normal file
12
web/server.go
Normal 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}
|
||||
}
|
||||
Reference in New Issue
Block a user