mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +00:00
Update to 8.3.0 | MVC Models and Bindings and fix of #723 , read HISTORY.md
Former-commit-id: d8f66d8d370c583a288333df2a14c6ee2dc56466
This commit is contained in:
@@ -5,13 +5,13 @@ package main
|
||||
import (
|
||||
"github.com/kataras/iris"
|
||||
"github.com/kataras/iris/context"
|
||||
|
||||
"github.com/kataras/iris/middleware/logger"
|
||||
"github.com/kataras/iris/middleware/recover"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := iris.New()
|
||||
|
||||
// Optionally, add two built'n handlers
|
||||
// that can recover from any http-relative panics
|
||||
// and log the requests to the terminal.
|
||||
@@ -21,7 +21,7 @@ func main() {
|
||||
// Method: GET
|
||||
// Resource: http://localhost:8080/
|
||||
app.Handle("GET", "/", func(ctx context.Context) {
|
||||
ctx.HTML("<b>Hello world!</b>")
|
||||
ctx.HTML("<b>Welcome!</b>")
|
||||
})
|
||||
|
||||
// same as app.Handle("GET", "/ping", [...])
|
||||
|
||||
Reference in New Issue
Block a user