initial commit

This commit is contained in:
2017-11-10 06:54:12 +00:00
commit a189881568
6 changed files with 201 additions and 0 deletions

22
tuu.go Normal file
View File

@@ -0,0 +1,22 @@
package tuu
import (
"github.com/gorilla/mux"
)
func New(r Router) *App {
return &App{router: r}
}
type App struct {
router Router
}
func (a *App) Serve() {
r := mux.NewRouter()
for _, route := range a.router.GetRoutes() {
r.Handle(route.Path, route).Methods(route.Method)
}
}