mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
move sessions and websocket examples, gofmt, fix misspells and experimental optimizations 🍐
Former-commit-id: cae4f94bbd404d26ab13dade02b52f81feaddf24
This commit is contained in:
@@ -42,7 +42,6 @@ func main() {
|
||||
Age: 25,
|
||||
}
|
||||
|
||||
ctx.StatusCode(iris.StatusOK)
|
||||
// Manually setting a content type: ctx.ContentType("application/javascript")
|
||||
ctx.JSON(peter)
|
||||
})
|
||||
@@ -83,5 +82,13 @@ func main() {
|
||||
// http://localhost:8080/jsonp
|
||||
// http://localhost:8080/xml
|
||||
// http://localhost:8080/markdown
|
||||
app.Run(iris.Addr(":8080"))
|
||||
//
|
||||
// `iris.WithOptimizations` is an optional configurator,
|
||||
// if passed to the `Run` then it will ensure that the application
|
||||
// response to the client as fast as possible.
|
||||
//
|
||||
//
|
||||
// `iris.WithoutServerError` is an optional configurator,
|
||||
// if passed to the `Run` then it will not print its passed error as an actual server error.
|
||||
app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed), iris.WithOptimizations)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user