2017-08-19 05:06:05 +02:00
|
|
|
package main
|
|
|
|
|
2017-12-16 05:38:28 +01:00
|
|
|
/// TODO: remove this on the "master" branch, or even replace it
|
|
|
|
// with the "iris-mvc" (the new implementatioin is even faster, close to handlers version,
|
|
|
|
// with bindings or without).
|
|
|
|
|
2017-08-19 05:06:05 +02:00
|
|
|
import (
|
2017-12-16 16:57:20 +01:00
|
|
|
"github.com/kataras/iris/_benchmarks/iris-mvc/controllers"
|
2017-12-16 05:38:28 +01:00
|
|
|
|
2017-08-19 05:06:05 +02:00
|
|
|
"github.com/kataras/iris"
|
2017-12-16 05:38:28 +01:00
|
|
|
"github.com/kataras/iris/mvc"
|
2017-08-19 05:06:05 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
app := iris.New()
|
2017-12-16 05:38:28 +01:00
|
|
|
mvc.New(app.Party("/api/values/{id}")).Register(new(controllers.ValuesController))
|
2017-08-24 14:40:06 +02:00
|
|
|
app.Run(iris.Addr(":5000"), iris.WithoutVersionChecker)
|
2017-08-19 05:06:05 +02:00
|
|
|
}
|
2017-12-16 16:57:20 +01:00
|
|
|
|
|
|
|
// +2MB/s faster than the previous implementation, 0.4MB/s difference from the raw handlers.
|