func main() { pub := &Pub{relay.NewController("")} routes := relay.NewRoutes("") routes.RouteGET("/", pub.BindHTTP("", "/", pub.Index)) http.ListenAndServe(":3030", routes) }
// NewTodoController returns a new TodoController func NewTodoController(path string, db TodoDatabase, app *engine.Engine) *TodoController { tc := &TodoController{ Controller: relay.NewController(path), db: db, } tc.home = app.Template.MustCreate("home.render", []string{"./home", "./layout"}, nil) tc.register() return tc }