1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 21:15:56 +00:00

omit errors received by the server via configuration 🍪 | requested by https://github.com/kataras/iris/issues/668

relative link: https://github.com/kataras/iris/issues/668


Former-commit-id: 6491abd68b74e18bf4ed0b32406e67597c9b55a9
This commit is contained in:
hiveminded
2017-07-13 16:31:36 +03:00
parent ace439203d
commit 16ccb2edc4
12 changed files with 294 additions and 64 deletions

View File

@@ -1,35 +0,0 @@
// +build go1.9
package main
import (
"github.com/kataras/iris"
)
func main() {
app := iris.Default()
// Method: GET
// Resource: http://localhost:8080/
app.Handle("GET", "/", func(ctx iris.Context) {
ctx.HTML("<b>Hello world!</b>")
})
// same as app.Handle("GET", "/ping", [...])
// Method: GET
// Resource: http://localhost:8080/ping
app.Get("/ping", func(ctx iris.Context) {
ctx.WriteString("pong")
})
// Method: GET
// Resource: http://localhost:8080/hello
app.Get("/hello", func(ctx iris.Context) {
ctx.JSON(iris.Map{"message": "Hello iris web framework."})
})
// http://localhost:8080
// http://localhost:8080/ping
// http://localhost:8080/hello
app.Run(iris.Addr(":8080"))
}