iris/_examples/structuring/handler-based/routes/routes.go
Gerasimos (Makis) Maropoulos 38c6241055 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
2017-10-01 16:29:25 +03:00

15 lines
387 B
Go

package routes
import (
"github.com/kataras/iris/_examples/structuring/handler-based/bootstrap"
)
// Configure registers the nessecary routes to the app.
func Configure(b *bootstrap.Bootstrapper) {
// routes
b.Get("/", GetIndexHandler)
b.Get("/follower/{id:long}", GetFollowerHandler)
b.Get("/following/{id:long}", GetFollowingHandler)
b.Get("/like/{id:long}", GetLikeHandler)
}