2017-07-18 20:17:23 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2020-06-08 04:16:55 +02:00
|
|
|
"github.com/kataras/iris/v12/_examples/view/quicktemplate/controllers"
|
2017-07-18 20:17:23 +02:00
|
|
|
|
2019-10-25 00:27:02 +02:00
|
|
|
"github.com/kataras/iris/v12"
|
2017-07-18 20:17:23 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func newApp() *iris.Application {
|
|
|
|
app := iris.New()
|
|
|
|
app.Get("/", controllers.Index)
|
|
|
|
app.Get("/{name}", controllers.Hello)
|
|
|
|
|
|
|
|
return app
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
app := newApp()
|
|
|
|
// http://localhost:8080
|
|
|
|
// http://localhost:8080/yourname
|
2020-04-28 04:22:58 +02:00
|
|
|
app.Listen(":8080")
|
2017-07-18 20:17:23 +02:00
|
|
|
}
|