mirror of
https://github.com/kataras/iris.git
synced 2025-01-24 11:11:03 +01:00
b657c5e6af
Former-commit-id: 673c84dd13bb99c0926aa1b4a6b4eff9745403d8
23 lines
401 B
Go
23 lines
401 B
Go
package main
|
|
|
|
import (
|
|
"github.com/kataras/iris/v12/_examples/http_responsewriter/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")
|
|
}
|