mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
update the documents for the new MVC API and some of its new features but not finished yet, README big examples and _examples/mvc/login is are yet updated and I'm thinking of removing the big examples on README.md, they exist on the _examples/mvc updated.
Former-commit-id: c2938d4bcaa3520744526f7975ee3cce632499b3
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/kataras/iris"
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/mvc"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -17,21 +18,13 @@ const (
|
||||
|
||||
func main() {
|
||||
app := iris.New()
|
||||
app.Configure(configure)
|
||||
|
||||
// app.Controller("/", new(controllers.IndexController))
|
||||
// app.Controller("/about", new(controllers.AboutController))
|
||||
// app.Controller("/contact", new(controllers.ContactController))
|
||||
|
||||
app.Controller("/", new(controllers.HomeController))
|
||||
|
||||
app.Run(iris.Addr(":5000"), iris.WithoutVersionChecker)
|
||||
}
|
||||
|
||||
func configure(app *iris.Application) {
|
||||
app.RegisterView(iris.HTML("./views", ".html").Layout("shared/layout.html"))
|
||||
app.StaticWeb("/public", publicDir)
|
||||
app.OnAnyErrorCode(onError)
|
||||
|
||||
mvc.New(app).Register(new(controllers.HomeController))
|
||||
|
||||
app.Run(iris.Addr(":5000"), iris.WithoutVersionChecker)
|
||||
}
|
||||
|
||||
type err struct {
|
||||
|
||||
Reference in New Issue
Block a user