2017-08-19 05:06:05 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
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-19 22:40:42 +01:00
|
|
|
mvc.New(app.Party("/api/values/{id}")).
|
2017-12-27 03:15:41 +01:00
|
|
|
Handle(new(controllers.ValuesController))
|
2017-12-19 22:40:42 +01:00
|
|
|
|
2018-10-21 18:20:05 +02:00
|
|
|
app.Run(iris.Addr(":5000"))
|
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.
|