mirror of
https://github.com/kataras/iris.git
synced 2025-12-19 10:57:05 +00:00
Add a third, simple, example for folder structuring as requested at https://github.com/kataras/iris/issues/748
One change to code base but it will be described at the next version: Error Handlers (`app.OnErrorCode/OnAnyErrorCode`) respect the `app.UseGlobal`'s middlewares now (not the `app.Use` for reasons we can all understand, hopefully). Former-commit-id: ec97bbb04548f9932cf4d7b950be513b70747bcb
This commit is contained in:
20
_examples/structuring/handler-based/main.go
Normal file
20
_examples/structuring/handler-based/main.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/_examples/structuring/handler-based/bootstrap"
|
||||
"github.com/kataras/iris/_examples/structuring/handler-based/middleware/identity"
|
||||
"github.com/kataras/iris/_examples/structuring/handler-based/routes"
|
||||
)
|
||||
|
||||
var app = bootstrap.New("Awesome App", "kataras2006@hotmail.com",
|
||||
identity.Configure,
|
||||
routes.Configure,
|
||||
)
|
||||
|
||||
func init() {
|
||||
app.Bootstrap()
|
||||
}
|
||||
|
||||
func main() {
|
||||
app.Listen(":8080")
|
||||
}
|
||||
Reference in New Issue
Block a user