mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
7bb2223226
Former-commit-id: 84f1e894378a6dfd94e0bf057f4037e35aee0c4f
23 lines
386 B
Go
23 lines
386 B
Go
package main
|
|
|
|
import (
|
|
"github.com/kataras/iris/v12/_examples/view/quicktemplate/controllers"
|
|
|
|
"github.com/kataras/iris/v12"
|
|
)
|
|
|
|
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
|
|
app.Listen(":8080")
|
|
}
|