2016-10-01 09:03:06 +02:00
< p align = "center" >
2016-12-11 06:50:03 +01:00
< a href = "https://www.gitbook.com/book/kataras/iris/details" > < img width = "500" src = "https://raw.githubusercontent.com/iris-contrib/website/gh-pages/assets/book/cover_6_flat_alpha.png" > < / a >
2016-05-30 16:08:09 +02:00
2016-07-25 19:28:44 +02:00
2016-10-01 09:03:06 +02:00
< br / >
2016-09-07 06:36:23 +02:00
2016-11-13 21:17:11 +01:00
2016-10-01 09:03:06 +02:00
< a href = "https://travis-ci.org/kataras/iris" > < img src = "https://img.shields.io/travis/kataras/iris.svg?style=flat-square" alt = "Build Status" > < / a >
2016-11-13 21:17:11 +01:00
< a href = "http://goreportcard.com/report/kataras/iris" > < img src = "https://img.shields.io/badge/report%20card%20-a%2B-F44336.svg?style=flat-square" alt = "http://goreportcard.com/report/kataras/iris" > < / a >
< a href = "https://golang.org" > < img src = "https://img.shields.io/badge/powered_by-go-6362c2.svg?style=flat-square" alt = "Built with GoLang" > < / a >
2016-10-01 09:03:06 +02:00
2016-11-13 21:17:11 +01:00
< a href = "https://golang.org" > < img src = "https://img.shields.io/badge/platform-any-ec2eb4.svg?style=flat-square" alt = "Cross framework" > < / a >
2016-10-01 09:03:06 +02:00
2016-11-13 21:17:11 +01:00
< a href = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=kataras2006%40hotmail%2ecom&lc=GR&item_name=Iris%20web%20framework&item_number=iriswebframeworkdonationid2016¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted" > < img src = "https://img.shields.io/badge/open-%20source-thisismycolor.svg?logo=data:image%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiPjxwYXRoIGZpbGw9InJnYigyMjAsMjIwLDIyMCkiIGQ9Ik04ODYuNiwzMDUuM2MtNDUuNywyMDMuMS0xODcsMzEwLjMtNDA5LjYsMzEwLjNoLTc0LjFsLTUxLjUsMzI2LjloLTYybC0zLjIsMjEuMWMtMi4xLDE0LDguNiwyNi40LDIyLjYsMjYuNGgxNTguNWMxOC44LDAsMzQuNy0xMy42LDM3LjctMzIuMmwxLjUtOGwyOS45LTE4OS4zbDEuOS0xMC4zYzIuOS0xOC42LDE4LjktMzIuMiwzNy43LTMyLjJoMjMuNWMxNTMuNSwwLDI3My43LTYyLjQsMzA4LjktMjQyLjdDOTIxLjYsNDA2LjgsOTE2LjcsMzQ4LjYsODg2LjYsMzA1LjN6Ii8%2BPHBhdGggZmlsbD0icmdiKDIyMCwyMjAsMjIwKSIgZD0iTTc5MS45LDgzLjlDNzQ2LjUsMzIuMiw2NjQuNCwxMCw1NTkuNSwxMEgyNTVjLTIxLjQsMC0zOS44LDE1LjUtNDMuMSwzNi44TDg1LDg1MWMtMi41LDE1LjksOS44LDMwLjIsMjUuOCwzMC4ySDI5OWw0Ny4zLTI5OS42bC0xLjUsOS40YzMuMi0yMS4zLDIxLjQtMzYuOCw0Mi45LTM2LjhINDc3YzE3NS41LDAsMzEzLTcxLjIsMzUzLjItMjc3LjVjMS4yLTYuMSwyLjMtMTIuMSwzLjEtMTcuOEM4NDUuMSwxODIuOCw4MzMuMiwxMzAuOCw3OTEuOSw4My45TDc5MS45LDgzLjl6Ii8%2BPC9zdmc%2B" alt = "Donation" > < / a >
2016-10-01 09:03:06 +02:00
< br / >
2017-01-13 04:57:46 +01:00
< a href = "https://github.com/kataras/iris/blob/master/HISTORY.md" > < img src = "https://img.shields.io/badge/%20version%20-%206.1.2%20-blue.svg?style=flat-square" alt = "CHANGELOG/HISTORY" > < / a >
2016-10-01 09:03:06 +02:00
< a href = "https://github.com/iris-contrib/examples" > < img src = "https://img.shields.io/badge/%20examples-repository-3362c2.svg?style=flat-square" alt = "Examples" > < / a >
2016-10-15 15:40:43 +02:00
< a href = "https://docs.iris-go.com" > < img src = "https://img.shields.io/badge/%20docs-reference-5272B4.svg?style=flat-square" alt = "Practical Guide/Docs" > < / a >
2016-10-01 09:03:06 +02:00
2016-11-13 21:17:11 +01:00
< a href = "https://kataras.rocket.chat/channel/iris" > < img src = "https://img.shields.io/badge/%20community-chat-00BCD4.svg?style=flat-square" alt = "Chat" > < / a > < br / >
< br / >
2016-10-01 09:03:06 +02:00
2017-01-02 20:20:17 +01:00
< b > Iris< / b > is the fastest HTTP/2 web framework written in Go.
2016-12-04 05:53:08 +01:00
< br / >
2016-12-11 06:50:03 +01:00
< b > Easy< / b > to < a href = "https://docs.iris-go.com" > learn< / a > while it's highly customizable,
ideally suited for < br / > both experienced and novice developers.< br / > < br / >
Besides the fact that Iris is faster than any alternatives you may met before, < br / > thanks to its fluent API, < b > you don't have to be an expert to work with it.< / b > < br / > < br / >
2016-11-13 21:17:11 +01:00
2016-12-12 11:18:59 +01:00
If you're coming from < a href = "https://nodejs.org/en/" > Node.js< / a > world, this is the < a href = "https://github.com/expressjs/express" > expressjs< / a > alternative for the < a href = "https://golang.org" > Go Programming Language.< / a >
2016-12-11 06:50:03 +01:00
< br / >
2016-11-13 21:17:11 +01:00
2016-10-04 00:18:17 +02:00
< / p >
2016-12-11 06:50:03 +01:00
2017-01-13 01:13:02 +01:00
< p align = "center" >
< img src = "https://github.com/iris-contrib/website/raw/gh-pages/assets/comics/comic1.png" / >
< / p >
2016-12-11 06:50:03 +01:00
2016-12-14 10:57:07 +01:00
Feature Overview
-----------
2016-10-01 09:03:06 +02:00
2016-12-14 10:57:07 +01:00
- Focus on high performance
2017-01-02 20:20:17 +01:00
- Highly customizable
- HTTP/2 full support
- Hot Reload on source code changes
- Compatible with all net/http handlers
2016-12-14 10:57:07 +01:00
- Automatically install and serve certificates from https://letsencrypt.org
- Robust routing and middleware ecosystem
- Build RESTful APIs
2017-01-02 20:20:17 +01:00
- Context Scoped Transactions
2016-12-14 10:57:07 +01:00
- Group API's and subdomains with wildcard support
- Body binding for JSON, XML, Forms, can be extended to use your own custom binders
- More than 50 handy functions to send HTTP responses
- View system: supporting more than 6+ template engines, with prerenders. You can still use your favorite
- Define virtual hosts and (wildcard) subdomains with path level routing
- Graceful shutdown
- Limit request body
- Localization i18N
2017-01-02 20:20:17 +01:00
- Serve static files, directories and streams
- Fast Cache System
2016-12-14 10:57:07 +01:00
- Customizable format and output for the logger
- Customizable HTTP errors
- Compression (Gzip)
- Authentication
- OAuth, OAuth2 supporting 27+ popular websites
- JWT
- Basic Authentication
2017-01-02 20:20:17 +01:00
- HTTP Sessions and flash messages
2016-12-14 10:57:07 +01:00
- Add / Remove trailing slash from the URL with option to redirect
2017-01-02 20:20:17 +01:00
- Redirect any request
2016-12-14 10:57:07 +01:00
- Highly scalable rich content render (Markdown, JSON, JSONP, XML...)
2017-01-02 20:20:17 +01:00
- Websocket API similar to socket.io
2016-12-14 10:57:07 +01:00
- Typescript integration + Web IDE
2017-01-02 20:20:17 +01:00
- Optional updater
2016-12-14 10:57:07 +01:00
- Feels like you used iris forever, thanks to its Fluent API
2017-01-02 20:20:17 +01:00
- And more...
2016-09-07 06:36:23 +02:00
2016-11-13 21:17:11 +01:00
Quick Start
-----------
2016-09-18 12:31:53 +02:00
2016-06-26 19:25:55 +02:00
```bash
2017-01-10 14:14:14 +01:00
go get -u github.com/kataras/iris/iris
2016-06-26 19:25:55 +02:00
```
2016-05-30 16:08:09 +02:00
2016-10-02 13:59:04 +02:00
```sh
2016-12-11 06:50:03 +01:00
cat hellojson.go
2016-10-02 13:59:04 +02:00
```
2016-07-23 16:01:01 +02:00
2016-10-02 13:59:04 +02:00
```go
package main
2016-07-23 16:01:01 +02:00
2016-10-02 13:59:04 +02:00
import "github.com/kataras/iris"
2016-07-23 16:01:01 +02:00
2016-10-02 13:59:04 +02:00
func main(){
2016-07-23 16:01:01 +02:00
2016-12-04 05:53:08 +01:00
// http://localhost:5700/api/user/42
// Method: "GET"
iris.Get("/api/user/:id", func(ctx *iris.Context){
2016-07-23 16:01:01 +02:00
2016-12-04 05:53:08 +01:00
// take the :id from the path, parse to integer
// and set it to the new userID local variable.
2016-12-19 10:15:48 +01:00
userID,_ := ctx.ParamInt("id")
2016-12-04 05:53:08 +01:00
// userRepo, imaginary database service < - your only job .
user := userRepo.GetByID(userID)
// send back a response to the client,
// .JSON: content type as application/json; charset="utf-8"
// iris.StatusOK: with 200 http status code.
//
// send user as it is or make use of any json valid golang type,
// like the iris.Map{"username" : user.Username}.
ctx.JSON(iris.StatusOK, user)
})
2016-07-23 16:01:01 +02:00
2017-01-10 14:14:14 +01:00
iris.Listen(":6000")
2016-10-02 13:59:04 +02:00
}
2016-07-23 16:01:01 +02:00
2016-10-02 13:59:04 +02:00
```
2016-07-23 16:01:01 +02:00
2016-10-02 13:59:04 +02:00
```sh
2016-12-04 05:53:08 +01:00
$ go run hellojson.go
2016-10-02 13:59:04 +02:00
```
2017-01-10 14:14:14 +01:00
> TIP #1> $ iris run main.go to enable hot-reload on .go source code changes.
2016-07-23 16:08:24 +02:00
2017-01-11 15:23:38 +01:00
> TIP #2> iris.Config.IsDevelopment = true to monitor the changes you make in the templates.
2017-01-10 14:14:14 +01:00
Open your browser or any other http client at http://localhost:6000/api/user/42.
2016-07-23 16:01:01 +02:00
2016-12-14 10:57:07 +01:00
2016-10-02 13:59:04 +02:00
### New
2016-09-30 17:48:48 +02:00
2016-10-02 13:59:04 +02:00
```go
// New with default configuration
app := iris.New()
2016-09-30 17:48:48 +02:00
2016-10-02 13:59:04 +02:00
app.Listen(....)
2016-09-30 17:48:48 +02:00
2016-10-02 13:59:04 +02:00
// New with configuration struct
2017-01-02 20:20:17 +01:00
app := iris.New(iris.Configuration{ IsDevelopment: true})
2016-09-30 17:48:48 +02:00
2016-10-02 13:59:04 +02:00
app.Listen(...)
// Default station
iris.Listen(...)
// Default station with custom configuration
2017-01-02 20:20:17 +01:00
// view the whole configuration at: ./configuration.go
iris.Config.IsDevelopment = true
iris.Config.Charset = "UTF-8"
2016-10-02 13:59:04 +02:00
iris.Listen(...)
```
### Listening
`Serve(ln net.Listener) error`
```go
ln, err := net.Listen("tcp4", ":8080")
if err := iris.Serve(ln); err != nil {
panic(err)
}
```
`Listen(addr string)`
```go
iris.Listen(":8080")
```
`ListenTLS(addr string, certFile, keyFile string)`
```go
iris.ListenTLS(":8080", "./ssl/mycert.cert", "./ssl/mykey.key")
```
2016-10-28 20:21:57 +02:00
`ListenLETSENCRYPT(addr string, cacheFileOptional ...string)`
2016-10-02 13:59:04 +02:00
```go
2016-10-28 20:21:57 +02:00
iris.ListenLETSENCRYPT("mydomain.com")
2016-10-02 13:59:04 +02:00
```
2016-10-28 20:21:57 +02:00
```go
iris.Serve(iris.LETSENCRYPTPROD("myproductionwebsite.com"))
```
2016-10-02 13:59:04 +02:00
And
2016-10-28 20:21:57 +02:00
2016-10-02 13:59:04 +02:00
```go
ListenUNIX(addr string, mode os.FileMode)
Close() error
Reserve() error
IsRunning() bool
```
### Routing
```go
iris.Get("/products/:id", getProduct)
iris.Post("/products", saveProduct)
iris.Put("products/:id", editProduct)
iris.Delete("/products/:id", deleteProduct)
```
And
```go
iris.Patch("", ...)
iris.Connect("", ...)
iris.Options("", ...)
iris.Trace("", ...)
```
### Path Parameters
```go
func getProduct(ctx *iris.Context){
// Get id from path '/products/:id'
id := ctx.Param("id")
}
```
### Query Parameters
2016-07-30 16:24:12 +02:00
2016-10-02 13:59:04 +02:00
`/details?color=blue&weight=20`
2016-06-15 23:17:23 +02:00
2016-10-02 13:59:04 +02:00
```go
func details(ctx *iris.Context){
2017-01-02 20:20:17 +01:00
color := ctx.URLParam("color")
weight,_ := ctx.URLParamInt("weight")
2016-10-02 13:59:04 +02:00
}
```
### Form `application/x-www-form-urlencoded`
`METHOD: POST | PATH: /save`
name | value
:--- | :---
name | Gerasimos Maropoulos
email | kataras2006@homail.com
```go
func save(ctx *iris.Context) {
// Get name and email
2017-01-02 20:20:17 +01:00
name := ctx.FormValue("name")
email := ctx.FormValue("email")
2016-10-02 13:59:04 +02:00
}
```
### Form `multipart/form-data`
`POST` `/save`
name | value
:--- | :---
name | Gerasimos Maropoulos
email | kataras2006@hotmail.com
avatar | avatar
```go
func save(ctx *iris.Context) {
// Get name and email
2017-01-02 20:20:17 +01:00
name := ctx.FormValue("name")
email := ctx.FormValue("email")
2016-10-02 13:59:04 +02:00
// Get avatar
2017-01-02 20:20:17 +01:00
avatar, info, err := ctx.FormFile("avatar")
2016-10-02 13:59:04 +02:00
if err != nil {
2016-10-02 14:07:52 +02:00
ctx.EmitError(iris.StatusInternalServerError)
return
2016-10-02 13:59:04 +02:00
}
2017-01-02 20:20:17 +01:00
defer avatar.Close()
2016-10-02 13:59:04 +02:00
// Destination
dst, err := os.Create(avatar.Filename)
if err != nil {
2016-10-02 14:07:52 +02:00
ctx.EmitError(iris.StatusInternalServerError)
return
2016-10-02 13:59:04 +02:00
}
defer dst.Close()
// Copy
2017-01-02 20:20:17 +01:00
if _, err = io.Copy(dst, avatar); err != nil {
2016-10-02 14:07:52 +02:00
ctx.EmitError(iris.StatusInternalServerError)
return
2016-10-02 13:59:04 +02:00
}
ctx.HTML(iris.StatusOK, "< b > Thanks!< / b > ")
}
```
### Handling Request
- Bind `JSON` or `XML` or `form` payload into Go struct based on `Content-Type` request header.
- Render response as `JSON` or `XML` with status code.
```go
type User struct {
Name string `json:"name" xml:"name" form:"name"`
Email string `json:"email" xml:"email" form:"email"`
}
iris.Post("/users", func(ctx *iris.Context) {
u := new(User)
if err := ctx.ReadJSON(u); err != nil {
2016-10-02 14:07:52 +02:00
ctx.EmitError(iris.StatusInternalServerError)
return
2016-10-02 13:59:04 +02:00
}
ctx.JSON(iris.StatusCreated, u)
// or
// ctx.XML(iris.StatusCreated, u)
// ctx.JSONP(...)
// ctx.HTML(iris.StatusCreated, "< b > Hi "+u.Name+"< / b > ")
// ctx.Markdown(iris.StatusCreated, "## Name: "+u.Name)
})
```
2016-05-30 16:08:09 +02:00
2016-10-01 09:03:06 +02:00
| Name | Description | Usage |
| ------------------|:---------------------:|-------:|
2016-10-15 15:40:43 +02:00
| [JSON ](https://github.com/kataras/go-serializer/tree/master/json ) | JSON Serializer (Default) |[example 1](https://github.com/iris-contrib/examples/blob/master/serialize_engines/json_1/main.go),[example 2](https://github.com/iris-contrib/examples/blob/master/serialize_engines/json_2/main.go), [book section ](https://docs.iris-go.com/serialize-engines.html )
| [JSONP ](https://github.com/kataras/go-serializer/tree/master/jsonp ) | JSONP Serializer (Default) |[example 1](https://github.com/iris-contrib/examples/blob/master/serialize_engines/jsonp_1/main.go),[example 2](https://github.com/iris-contrib/examples/blob/master/serialize_engines/jsonp_2/main.go), [book section ](https://docs.iris-go.com/serialize-engines.html )
| [XML ](https://github.com/kataras/go-serializer/tree/master/xml ) | XML Serializer (Default) |[example 1](https://github.com/iris-contrib/examples/blob/master/serialize_engines/xml_1/main.go),[example 2](https://github.com/iris-contrib/examples/blob/master/serialize_engines/xml_2/main.go), [book section ](https://docs.iris-go.com/serialize-engines.html )
| [Markdown ](https://github.com/kataras/go-serializer/tree/master/markdown ) | Markdown Serializer (Default) |[example 1](https://github.com/iris-contrib/examples/blob/master/serialize_engines/markdown_1/main.go),[example 2](https://github.com/iris-contrib/examples/blob/master/serialize_engines/markdown_2/main.go), [book section ](https://docs.iris-go.com/serialize-engines.html )
| [Text ](https://github.com/kataras/go-serializer/tree/master/text ) | Text Serializer (Default) |[example 1](https://github.com/iris-contrib/examples/blob/master/serialize_engines/text_1/main.go), [book section ](https://docs.iris-go.com/serialize-engines.html )
| [Binary Data ](https://github.com/kataras/go-serializer/tree/master/data ) | Binary Data Serializer (Default) |[example 1](https://github.com/iris-contrib/examples/blob/master/serialize_engines/data_1/main.go), [book section ](https://docs.iris-go.com/serialize-engines.html )
2016-10-02 13:59:04 +02:00
2016-10-02 14:04:04 +02:00
### HTTP Errors
You can define your own handlers when http error occurs.
```go
package main
import (
"github.com/kataras/iris"
)
func main() {
iris.OnError(iris.StatusInternalServerError, func(ctx *iris.Context) {
2017-01-02 20:20:17 +01:00
ctx.Writef("CUSTOM 500 INTERNAL SERVER ERROR PAGE")
2016-10-02 14:04:04 +02:00
// or ctx.Render, ctx.HTML any render method you want
ctx.Log("http status: 500 happened!")
})
iris.OnError(iris.StatusNotFound, func(ctx *iris.Context) {
2017-01-02 20:20:17 +01:00
ctx.Writef("CUSTOM 404 NOT FOUND ERROR PAGE")
2016-10-02 14:04:04 +02:00
ctx.Log("http status: 404 happened!")
})
// emit the errors to test them
iris.Get("/500", func(ctx *iris.Context) {
ctx.EmitError(iris.StatusInternalServerError) // ctx.Panic()
})
iris.Get("/404", func(ctx *iris.Context) {
ctx.EmitError(iris.StatusNotFound) // ctx.NotFound()
})
iris.Listen(":80")
}
```
2016-10-02 13:59:04 +02:00
### Static Content
2017-01-02 20:20:17 +01:00
Serve files or directories, use the correct for your case, if you don't know which one, just use the `StaticWeb(reqPath string, systemPath string)` .
2016-10-02 13:59:04 +02:00
```go
2017-01-02 20:20:17 +01:00
// Favicon serves static favicon
// accepts 2 parameters, second is optional
// favPath (string), declare the system directory path of the __ .ico
// requestPath (string), it's the route's path, by default this is the "/favicon.ico" because some browsers tries to get this by default first,
// you can declare your own path if you have more than one favicon (desktop, mobile and so on)
2016-10-02 13:59:04 +02:00
//
2017-01-02 20:20:17 +01:00
// this func will add a route for you which will static serve the /yuorpath/yourfile.ico to the /yourfile.ico (nothing special that you can't handle by yourself)
2017-01-10 14:03:02 +01:00
// Note that you have to call it on every favicon you have to serve automatically (desktop, mobile and so on)
2016-10-02 13:59:04 +02:00
//
2017-01-02 20:20:17 +01:00
// panics on error
Favicon(favPath string, requestPath ...string) RouteNameFunc
2016-10-02 13:59:04 +02:00
2017-01-02 20:20:17 +01:00
// StaticHandler returns a new Handler which serves static files
StaticHandler(reqPath string, systemPath string, showList bool, enableGzip bool) HandlerFunc
2016-10-02 13:59:04 +02:00
// StaticWeb same as Static but if index.html e
// xists and request uri is '/' then display the index.html's contents
// accepts three parameters
// first parameter is the request url path (string)
// second parameter is the system directory (string)
2017-01-02 20:20:17 +01:00
StaticWeb(reqPath string, systemPath string) RouteNameFunc
2017-01-10 14:03:02 +01:00
// StaticEmbedded used when files are distributed inside the app executable, using go-bindata mostly
2017-01-02 20:20:17 +01:00
// First parameter is the request path, the path which the files in the vdir will be served to, for example "/static"
// Second parameter is the (virtual) directory path, for example "./assets"
// Third parameter is the Asset function
// Forth parameter is the AssetNames function
//
// For more take a look at the
// example: https://github.com/iris-contrib/examples/tree/master/static_files_embedded
StaticEmbedded(requestPath string, vdir string, assetFn func(name string) ([]byte, error), namesFn func() []string) RouteNameFunc
// StaticContent serves bytes, memory cached, on the reqPath
// a good example of this is how the websocket server uses that to auto-register the /iris-ws.js
StaticContent(reqPath string, cType string, content []byte) RouteNameFunc
2016-10-02 13:59:04 +02:00
// StaticServe serves a directory as web resource
// it's the simpliest form of the Static* functions
// Almost same usage as StaticWeb
// accepts only one required parameter which is the systemPath
// (the same path will be used to register the GET& HEAD routes)
// if the second parameter is empty, otherwise the requestPath is the second parameter
// it uses gzip compression (compression on each request, no file cache)
StaticServe(systemPath string, requestPath ...string)
```
```go
2017-01-02 20:20:17 +01:00
iris.StaticWeb("/public", "./static/assets/")
2016-10-02 13:59:04 +02:00
//-> /public/assets/favicon.ico
```
```go
2017-01-02 20:20:17 +01:00
iris.StaticWeb("/","./my_static_html_website")
2016-10-02 13:59:04 +02:00
```
```go
2017-01-02 20:20:17 +01:00
context.StaticServe(systemPath string, requestPath ...string)
2016-10-02 13:59:04 +02:00
```
#### Manual static file serving
```go
// ServeFile serves a view file, to send a file
// to the client you should use the SendFile(serverfilename,clientfilename)
// receives two parameters
// filename/path (string)
// gzipCompression (bool)
//
// You can define your own "Content-Type" header also, after this function call
2017-01-02 20:20:17 +01:00
context.ServeFile(filename string, gzipCompression bool) error
2016-10-02 13:59:04 +02:00
```
Serve static individual file
```go
iris.Get("/txt", func(ctx *iris.Context) {
ctx.ServeFile("./myfolder/staticfile.txt", false)
}
```
### Templates
**HTML Template Engine, defaulted**
```html
<!-- file ./templates/hi.html -->
< html >
< head >
< title > Hi Iris< / title >
< / head >
< body >
< h1 > Hi {{.Name}}
< / body >
< / html >
```
```go
// file ./main.go
package main
import "github.com/kataras/iris"
func main() {
iris.Config.IsDevelopment = true // this will reload the templates on each request
iris.Get("/hi", hi)
iris.Listen(":8080")
}
func hi(ctx *iris.Context) {
ctx.MustRender("hi.html", struct{ Name string }{Name: "iris"})
}
```
| Name | Description | Usage |
| ------------------|:---------------------:|-------:|
2016-10-15 15:40:43 +02:00
| [HTML/Default Engine ](https://github.com/kataras/go-template/tree/master/html ) | HTML Template Engine (Default) |[example ](https://github.com/iris-contrib/examples/blob/master/template_engines/template_html_0/main.go), [book section ](https://docs.iris-go.com/template-engines.html )
| [Django Engine ](https://github.com/kataras/go-template/tree/master/django ) | Django Template Engine |[example ](https://github.com/iris-contrib/examples/blob/master/template_engines/template_django_1/main.go), [book section ](https://docs.iris-go.com/template-engines.html )
| [Pug/Jade Engine ](https://github.com/kataras/go-template/tree/master/pug ) | Pug Template Engine |[example ](https://github.com/iris-contrib/examples/blob/master/template_engines/template_pug_1/main.go), [book section ](https://docs.iris-go.com/template-engines.html )
| [Handlebars Engine ](https://github.com/kataras/go-template/tree/master/handlebars ) | Handlebars Template Engine |[example ](https://github.com/iris-contrib/examples/blob/master/template_engines/template_handlebars_1/main.go), [book section ](https://docs.iris-go.com/template-engines.html )
| [Amber Engine ](https://github.com/kataras/go-template/tree/master/amber ) | Amber Template Engine |[example ](https://github.com/iris-contrib/examples/blob/master/template_engines/template_amber_1/main.go), [book section ](https://docs.iris-go.com/template-engines.html )
| [Markdown Engine ](https://github.com/kataras/go-template/tree/master/markdown ) | Markdown Template Engine |[example ](https://github.com/iris-contrib/examples/blob/master/template_engines/template_markdown_1/main.go), [book section ](https://docs.iris-go.com/template-engines.html )
2016-10-02 13:59:04 +02:00
> Each section of the README has its own - more advanced - subject on the book, so be sure to check book for any further research
2016-10-15 15:40:43 +02:00
[Read more ](https://docs.iris-go.com/template-engines.html )
2016-10-02 13:59:04 +02:00
### Middleware ecosystem
```go
import (
"github.com/iris-contrib/middleware/logger"
"github.com/iris-contrib/middleware/cors"
"github.com/iris-contrib/middleware/basicauth"
)
// Root level middleware
iris.Use(logger.New())
iris.Use(cors.Default())
// Group level middleware
authConfig := basicauth.Config{
Users: map[string]string{"myusername": "mypassword", "mySecondusername": "mySecondpassword"},
Realm: "Authorization Required", // if you don't set it it's "Authorization Required"
ContextKey: "mycustomkey", // if you don't set it it's "user"
Expires: time.Duration(30) * time.Minute,
}
authentication := basicauth.New(authConfig)
g := iris.Party("/admin")
g.Use(authentication)
// Route level middleware
logme := func(ctx *iris.Context) {
println("request to /products")
ctx.Next()
}
iris.Get("/products", logme, func(ctx *iris.Context) {
ctx.Text(iris.StatusOK, "/products")
})
```
| Name | Description | Usage |
| ------------------|:---------------------:|-------:|
2016-10-15 15:40:43 +02:00
| [Basicauth Middleware ](https://github.com/iris-contrib/middleware/tree/master/basicauth ) | HTTP Basic authentication |[example 1](https://github.com/iris-contrib/examples/blob/master/middleware_basicauth_1/main.go), [example 2 ](https://github.com/iris-contrib/examples/blob/master/middleware_basicauth_2/main.go ), [book section ](https://docs.iris-go.com/basic-authentication.html ) |
| [JWT Middleware ](https://github.com/iris-contrib/middleware/tree/master/jwt ) | JSON Web Tokens |[example ](https://github.com/iris-contrib/examples/blob/master/middleware_jwt/main.go), [book section ](https://docs.iris-go.com/jwt.html ) |
2016-10-01 09:03:06 +02:00
| [Cors Middleware ](https://github.com/iris-contrib/middleware/tree/master/cors ) | Cross Origin Resource Sharing W3 specification | [how to use ](https://github.com/iris-contrib/middleware/tree/master/cors#how-to-use ) |
| [Secure Middleware ](https://github.com/iris-contrib/middleware/tree/master/secure ) | Facilitates some quick security wins | [example ](https://github.com/iris-contrib/examples/blob/master/middleware_secure/main.go ) |
2016-10-15 15:40:43 +02:00
| [I18n Middleware ](https://github.com/iris-contrib/middleware/tree/master/i18n ) | Simple internationalization | [example ](https://github.com/iris-contrib/examples/tree/master/middleware_internationalization_i18n ), [book section ](https://docs.iris-go.com/middleware-internationalization-and-localization.html ) |
2016-10-01 09:03:06 +02:00
| [Recovery Middleware ](https://github.com/iris-contrib/middleware/tree/master/recovery ) | Safety recover the station from panic | [example ](https://github.com/iris-contrib/examples/blob/master/middleware_recovery/main.go ) |
2016-10-15 15:40:43 +02:00
| [Logger Middleware ](https://github.com/iris-contrib/middleware/tree/master/logger ) | Logs every request | [example ](https://github.com/iris-contrib/examples/blob/master/middleware_logger/main.go ), [book section ](https://docs.iris-go.com/logger.html ) |
2017-01-09 01:00:29 +01:00
| [LoggerZap Middleware ](https://github.com/iris-contrib/middleware/tree/master/loggerzap ) | Logs every request using zap | [example ](https://github.com/iris-contrib/examples/blob/master/middleware_logger/main.go ), [book section ](https://docs.iris-go.com/logger.html ) |
2016-10-01 09:03:06 +02:00
| [Profile Middleware ](https://github.com/iris-contrib/middleware/tree/master/pprof ) | Http profiling for debugging | [example ](https://github.com/iris-contrib/examples/blob/master/middleware_pprof/main.go ) |
2016-10-15 15:40:43 +02:00
| [Editor Plugin ](https://github.com/iris-contrib/plugin/tree/master/editor ) | Alm-tools, a typescript online IDE/Editor | [book section ](https://docs.iris-go.com/plugin-editor.html ) |
| [Typescript Plugin ](https://github.com/iris-contrib/plugin/tree/master/typescript ) | Auto-compile client-side typescript files | [book section ](https://docs.iris-go.com/plugin-typescript.html ) |
| [OAuth,OAuth2 Plugin ](https://github.com/iris-contrib/plugin/tree/master/oauth ) | User Authentication was never be easier, supports >27 providers | [example ](https://github.com/iris-contrib/examples/tree/master/plugin_oauth_oauth2 ), [book section ](https://docs.iris-go.com/plugin-oauth.html ) |
| [Iris control Plugin ](https://github.com/iris-contrib/plugin/tree/master/iriscontrol ) | Basic (browser-based) control over your Iris station | [example ](https://github.com/iris-contrib/examples/blob/master/plugin_iriscontrol/main.go ), [book section ](https://docs.iris-go.com/plugin-iriscontrol.html ) |
2016-10-01 09:03:06 +02:00
2017-01-08 05:11:50 +01:00
> NOTE: All net/http handlers and middleware that already created by other go developers are also compatible with Iris, even if they are not be documented here, read more [here](https://github.com/iris-contrib/middleware#can-i-use-standard-nethttp-handler-with-iris).
2016-10-02 13:59:04 +02:00
### Sessions
If you notice a bug or issue [post it here ](https://github.com/kataras/go-sessions ).
- Cleans the temp memory when a session is idle, and re-allocates it to the temp memory when it's necessary.
The most used sessions are optimized to be in the front of the memory's list.
- Supports any type of database, currently only [Redis ](https://github.com/kataras/go-sessions/tree/master/sessiondb/redis ) and [LevelDB ](https://github.com/kataras/go-sessions/tree/master/sessiondb/leveldb ).
**A session can be defined as a server-side storage of information that is desired to persist throughout the user's interaction with the web application**.
Instead of storing large and constantly changing data via cookies in the user's browser (i.e. CookieStore),
**only a unique identifier is stored on the client side** called a "session id".
This session id is passed to the web server on every request.
The web application uses the session id as the key for retrieving the stored data from the database/memory. The session data is then available inside the iris.Context.
```go
iris.Get("/", func(ctx *iris.Context) {
2017-01-02 20:20:17 +01:00
ctx.Writef("You should navigate to the /set, /get, /delete, /clear,/destroy instead")
2016-10-02 13:59:04 +02:00
})
iris.Get("/set", func(ctx *iris.Context) {
//set session values
ctx.Session().Set("name", "iris")
//test if setted here
2017-01-02 20:20:17 +01:00
ctx.Writef("All ok session setted to: %s", ctx.Session().GetString("name"))
2016-10-02 13:59:04 +02:00
})
iris.Get("/get", func(ctx *iris.Context) {
// get a specific key as a string.
// returns an empty string if the key was not found.
name := ctx.Session().GetString("name")
2017-01-02 20:20:17 +01:00
ctx.Writef("The name on the /set was: %s", name)
2016-10-02 13:59:04 +02:00
})
iris.Get("/delete", func(ctx *iris.Context) {
// delete a specific key
ctx.Session().Delete("name")
})
iris.Get("/clear", func(ctx *iris.Context) {
// removes all entries
ctx.Session().Clear()
})
iris.Get("/destroy", func(ctx *iris.Context) {
// destroy/removes the entire session and cookie
ctx.SessionDestroy()
ctx.Log("You have to refresh the page to completely remove the session (on browsers), so the name should NOT be empty NOW, is it?\n ame: %s\n\nAlso check your cookies in your browser's cookies, should be no field for localhost/127.0.0.1 (or whatever you use)", ctx.Session().GetString("name"))
2017-01-02 20:20:17 +01:00
ctx.Writef("You have to refresh the page to completely remove the session (on browsers), so the name should NOT be empty NOW, is it?\nName: %s\n\nAlso check your cookies in your browser's cookies, should be no field for localhost/127.0.0.1 (or whatever you use)", ctx.Session().GetString("name"))
2016-10-02 13:59:04 +02:00
})
iris.Listen(":8080")
```
2017-01-08 05:11:50 +01:00
- `iris.DestroySessionByID(string)`
```go
// DestroySessionByID removes the session entry
// from the server-side memory (and database if registered).
// Client's session cookie will still exist but it will be reseted on the next request.
//
// It's safe to use it even if you are not sure if a session with that id exists.
DestroySessionByID(string)
```
- `iris.DestroyAllSessions()`
```go
// DestroyAllSessions removes all sessions
// from the server-side memory (and database if registered).
// Client's session cookie will still exist but it will be reseted on the next request.
DestroyAllSessions()
```
2016-10-02 13:59:04 +02:00
> Each section of the README has its own - more advanced - subject on the book, so be sure to check book for any further research
2016-10-15 15:40:43 +02:00
[Read more ](https://docs.iris-go.com/package-sessions.html )
2016-10-02 13:59:04 +02:00
### Websockets
2017-01-09 05:23:49 +01:00
Server configuration
```go
iris.Config.Websocket{
// WriteTimeout time allowed to write a message to the connection.
// Default value is 15 * time.Second
WriteTimeout time.Duration
// PongTimeout allowed to read the next pong message from the connection
// Default value is 60 * time.Second
PongTimeout time.Duration
// PingPeriod send ping messages to the connection with this period. Must be less than PongTimeout
// Default value is (PongTimeout * 9) / 10
PingPeriod time.Duration
// MaxMessageSize max message size allowed from connection
// Default value is 1024
MaxMessageSize int64
// BinaryMessages set it to true in order to denotes binary data messages instead of utf-8 text
// see https://github.com/kataras/iris/issues/387#issuecomment-243006022 for more
// Defaults to false
BinaryMessages bool
// Endpoint is the path which the websocket server will listen for clients/connections
// Default value is empty string, if you don't set it the Websocket server is disabled.
Endpoint string
// ReadBufferSize is the buffer size for the underline reader
ReadBufferSize int
// WriteBufferSize is the buffer size for the underline writer
WriteBufferSize int
// Error specifies the function for generating HTTP error responses.
//
// The default behavior is to store the reason in the context (ctx.Set(reason)) and fire any custom error (ctx.EmitError(status))
Error func(ctx *Context, status int, reason error)
// CheckOrigin returns true if the request Origin header is acceptable. If
// CheckOrigin is nil, the host in the Origin header must not be set or
// must match the host of the request.
//
// The default behavior is to allow all origins
// you can change this behavior by setting the iris.Config.Websocket.CheckOrigin = iris.WebsocketCheckSameOrigin
CheckOrigin func(r *http.Request) bool
// IDGenerator used to create (and later on, set)
// an ID for each incoming websocket connections (clients).
// If empty then the ID is generated by the result of 64
// random combined characters
IDGenerator func(r *http.Request) string
}
```
Connection's methods
```go
ID() string
Request() *http.Request
// Receive from the client
On("anyCustomEvent", func(message string) {})
On("anyCustomEvent", func(message int){})
On("anyCustomEvent", func(message bool){})
On("anyCustomEvent", func(message anyCustomType){})
On("anyCustomEvent", func(){})
// Receive a native websocket message from the client
// compatible without need of import the iris-ws.js to the .html
OnMessage(func(message []byte){})
// Send to the client
Emit("anyCustomEvent", string)
Emit("anyCustomEvent", int)
Emit("anyCustomEvent", bool)
Emit("anyCustomEvent", anyCustomType)
// Send native websocket messages
// with config.BinaryMessages = true
// useful when you use proto or something like this.
EmitMessage([]byte("anyMessage"))
// Send to specific client(s)
To("otherConnectionId").Emit/EmitMessage...
To("anyCustomRoom").Emit/EmitMessage...
// Send to all opened connections/clients
To(websocket.All).Emit/EmitMessage...
// Send to all opened connections/clients EXCEPT this client
To(websocket.Broadcast).Emit/EmitMessage...
// Rooms, group of connections/clients
Join("anyCustomRoom")
Leave("anyCustomRoom")
// Fired when the connection is closed
OnDisconnect(func(){})
// Force-disconnect the client from the server-side
Disconnect() error
```
2016-10-02 13:59:04 +02:00
```go
// file ./main.go
package main
import (
"fmt"
"github.com/kataras/iris"
)
type clientPage struct {
Title string
Host string
}
func main() {
iris.Static("/js", "./static/js", 1)
iris.Get("/", func(ctx *iris.Context) {
2017-01-02 20:20:17 +01:00
ctx.Render("client.html", clientPage{"Client Page", ctx.Host()})
2016-10-02 13:59:04 +02:00
})
// the path at which the websocket client should register itself to
iris.Config.Websocket.Endpoint = "/my_endpoint"
var myChatRoom = "room1"
iris.Websocket.OnConnection(func(c iris.WebsocketConnection) {
c.Join(myChatRoom)
c.On("chat", func(message string) {
// to all except this connection ->
//c.To(iris.Broadcast).Emit("chat", "Message from: "+c.ID()+"-> "+message)
// to the client ->
//c.Emit("chat", "Message from myself: "+message)
// send the message to the whole room,
// all connections which are inside this room will receive this message
c.To(myChatRoom).Emit("chat", "From: "+c.ID()+": "+message)
})
c.OnDisconnect(func() {
fmt.Printf("\nConnection with ID: %s has been disconnected!", c.ID())
})
})
iris.Listen(":8080")
}
```
```js
// file js/chat.js
var messageTxt;
var messages;
$(function () {
messageTxt = $("#messageTxt");
messages = $("#messages");
ws = new Ws("ws://" + HOST + "/my_endpoint");
ws.OnConnect(function () {
console.log("Websocket connection enstablished");
});
ws.OnDisconnect(function () {
appendMessage($("< div > < center > < h3 > Disconnected< / h3 > < / center > < / div > "));
});
ws.On("chat", function (message) {
appendMessage($("< div > " + message + "< / div > "));
})
$("#sendBtn").click(function () {
//ws.EmitMessage(messageTxt.val());
ws.Emit("chat", messageTxt.val().toString());
messageTxt.val("");
})
})
function appendMessage(messageDiv) {
var theDiv = messages[0]
var doScroll = theDiv.scrollTop == theDiv.scrollHeight - theDiv.clientHeight;
messageDiv.appendTo(messages)
if (doScroll) {
theDiv.scrollTop = theDiv.scrollHeight - theDiv.clientHeight;
}
}
```
```html
<!-- file templates/client.html -->
< html >
< head >
< title > My iris-ws< / title >
< / head >
< body >
< div id = "messages" style = "border-width:1px;border-style:solid;height:400px;width:375px;" >
< / div >
< input type = "text" id = "messageTxt" / >
< button type = "button" id = "sendBtn" > Send< / button >
< script type = "text/javascript" >
var HOST = {{.Host}}
< / script >
< script src = "js/vendor/jquery-2.2.3.min.js" type = "text/javascript" > < / script >
<!-- /iris - ws.js is served automatically by the server -->
< script src = "/iris-ws.js" type = "text/javascript" > < / script >
<!-- -->
< script src = "js/chat.js" type = "text/javascript" > < / script >
< / body >
< / html >
```
View a working example by navigating [here ](https://github.com/iris-contrib/examples/tree/master/websocket ) and if you need more than one websocket server [click here ](https://github.com/iris-contrib/examples/tree/master/websocket_unlimited_servers ).
> Each section of the README has its own - more advanced - subject on the book, so be sure to check book for any further research
2016-10-15 15:40:43 +02:00
[Read more ](https://docs.iris-go.com/package-websocket.html )
2016-10-02 13:59:04 +02:00
### Need help?
< a href = "https://www.gitbook.com/book/kataras/iris/details" > < img align = "right" width = "125" src = "https://raw.githubusercontent.com/iris-contrib/website/gh-pages/assets/book/cover_4.jpg" > < / a >
2016-10-15 15:40:43 +02:00
- The most important is to read [the practical guide ](https://docs.iris-go.com/ ).
2016-10-02 13:59:04 +02:00
- Explore & download the [examples ](https://github.com/iris-contrib/examples ).
- [HISTORY.md ](https://github.com//kataras/iris/tree/master/HISTORY.md ) file is your best friend.
#### FAQ
Explore [these questions ](https://github.com/kataras/iris/issues?q=label%3Aquestion ) or navigate to the [community chat][Chat].
Support
------------
Hi, my name is Gerasimos Maropoulos and I'm the author of this project, let me put a few words about me.
I started to design iris the night of the 13 March 2016, some weeks later, iris started to became famous and I have to fix many issues and implement new features, but I didn't have time to work on Iris because I had a part time job and the (software engineering) colleague which I studied.
I wanted to make iris' users proud of the framework they're using, so I decided to interrupt my studies and colleague, two days later I left from my part time job also.
Today I spend all my days and nights coding for Iris, and I'm happy about this, therefore I have zero incoming value.
- :star: the project
- [Donate ](https://github.com/kataras/iris/blob/master/DONATIONS.md )
- :earth_americas: spread the word
- [Contribute ](#contributing ) to the project
2016-10-01 09:03:06 +02:00
2016-05-30 16:08:09 +02:00
Philosophy
------------
2016-10-02 23:10:33 +02:00
The Iris philosophy is to provide robust tooling for HTTP, making it a great solution for single page applications, web sites, hybrids, or public HTTP APIs. Keep note that, today, iris is faster than nginx itself.
2016-05-30 16:08:09 +02:00
Iris does not force you to use any specific ORM or template engine. With support for the most used template engines, you can quickly craft the perfect application.
2016-08-09 21:48:09 +02:00
2016-09-30 17:48:48 +02:00
Benchmarks
------------
2016-05-30 16:08:09 +02:00
2016-10-02 23:10:33 +02:00
2016-09-05 12:08:32 +02:00
This Benchmark test aims to compare the whole HTTP request processing between Go web frameworks.
2016-05-30 16:08:09 +02:00
2016-07-01 00:34:44 +02:00
2016-07-21 04:48:35 +02:00
![Benchmark Wizzard July 21, 2016- Processing Time Horizontal Graph ](https://raw.githubusercontent.com/smallnest/go-web-framework-benchmark/4db507a22c964c9bc9774c5b31afdc199a0fe8b7/benchmark.png )
2016-07-01 00:34:44 +02:00
2016-07-21 04:48:35 +02:00
**The results have been updated on July 21, 2016**
2016-05-30 16:08:09 +02:00
2016-10-02 23:10:33 +02:00
The second is an article I just found(**3 October 2016**) which compares Iris vs Nginx vs Nodejs express, it was written in Thai, so I used google to translate it to english.
![Iris vs Nginx vs Nodejs express ](https://github.com/iris-contrib/website/raw/gh-pages/assets/03Oct2016/iris_1.png )
The results showed that the req / sec iris do best at around 70k-50k, followed by nginx and nginx-php-fpm and nodejs respectively.
The error golang-iris and nginx work equally, followed by the final nginx and php-fpm at a ratio of 1: 1.
2016-10-27 02:17:09 +02:00
You can read the full article [here ](https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http://webcache.googleusercontent.com/search?q=cache:https%3A%2F%2Fwww.ntossapo.me%2F2016%2F08%2F13%2Fnginx-vs-nginx-php-fpm-vs-go-iris-vs-express-with-wrk%2F&edit-text=&act=url ).
2016-10-02 23:10:33 +02:00
2016-06-24 01:01:53 +02:00
Testing
------------
2017-01-10 07:54:39 +01:00
I recommend testing your API using this new library, [httpexpect ](https://github.com/gavv/httpexpect ). You can find Iris examples [here ](https://github.com/gavv/httpexpect/blob/master/_examples/iris_test.go ), [here ](https://github.com/kataras/iris/blob/master/http_test.go ) and [here ](https://github.com/kataras/iris/blob/master/context_test.go ).
2016-06-24 01:01:53 +02:00
2016-05-30 16:08:09 +02:00
Versioning
------------
2017-01-13 04:57:46 +01:00
Current: **v6.1.2**
2016-08-09 21:48:09 +02:00
2017-01-10 07:54:39 +01:00
Older: ** [v5/fasthttp ](https://github.com/kataras/iris/tree/5.0.0 )**
2016-12-15 14:26:06 +01:00
2016-10-01 09:03:06 +02:00
Iris is a **Community-Driven** Project, waiting for your suggestions and [feature requests ](https://github.com/kataras/iris/issues?utf8=%E2%9C%93&q=label%3A%22feature%20request%22 )!
2016-07-08 19:41:50 +02:00
2016-05-30 16:08:09 +02:00
People
------------
2016-06-16 04:24:01 +02:00
2016-10-21 02:06:50 +02:00
The author of Iris is [@kataras ](https://github.com/kataras ).
If **you** 're willing to donate and you can afford the cost, feel **free** to navigate to the [DONATIONS PAGE ](https://github.com/kataras/iris/blob/master/DONATIONS.md ).
2016-05-30 16:08:09 +02:00
2016-10-01 09:03:06 +02:00
Contributing
------------
2016-10-21 02:06:50 +02:00
Iris is the work of hundreds of the community's [feature requests ](https://github.com/kataras/iris/issues?utf8=%E2%9C%93&q=%20label%3A%22feature%20request%22%20 ) and [reports ](https://github.com/kataras/iris/issues?utf8=%E2%9C%93&q=label%3Abug ). I appreciate your help!
2016-10-14 02:52:03 +02:00
If you are interested in contributing to the Iris project, please see the document [CONTRIBUTING ](https://github.com/kataras/iris/blob/master/.github/CONTRIBUTING.md ).
2016-06-26 07:25:05 +02:00
2016-10-21 02:06:50 +02:00
2016-12-13 07:41:30 +01:00
Depends on:
2017-01-02 20:20:17 +01:00
- http protocol layer comes from [net/http ](https://github.com/golang/go/tree/master/src/net/http ), by Go Authors.
2016-12-13 07:41:30 +01:00
- rich and encoded responses support comes from [kataras/go-serializer ](https://github.com/kataras/go-serializer/tree/0.0.4 ), by me.
- template support comes from [kataras/go-template ](https://github.com/kataras/go-template/tree/0.0.3 ), by me.
- gzip support comes from [kataras/go-fs ](https://github.com/kataras/go-fs/tree/0.0.5 ) and the super-fast compression library [klauspost/compress/gzip ](https://github.com/klauspost/compress/tree/master/gzip ), by me & Klaus Post.
- websockets support comes from [kataras/go-websocket ](https://github.com/kataras/go-websocket/tree/0.0.2 ), by me.
- Base of the parameterized routing algorithm comes from [julienschmidt/httprouter ](https://github.com/julienschmidt/httprouter ), by Julien Schmidt, with some relative to performance edits by me.
- sessions support comes from [kataras/go-sessions ](https://github.com/kataras/go-sessions/tree/0.0.6 ), by me.
- caching support comes from [geekypanda/httpcache ](https://github.com/geekypanda/httpcache/tree/0.0.1 ), by me and GeekyPanda.
- end-to-end http test APIs comes from [gavv/httpexpect ](https://github.com/gavv/httpexpect ), by Victor Gaydov.
- hot-reload on source code changes comes from [kataras/rizla ](https://github.com/kataras/rizla ), by me.
- auto-updater (via github) comes from [kataras/go-fs ](https://github.com/kataras/go-fs ), by me.
- request body form binder is an [edited version ](https://github.com/iris-contrib/formBinder ) of the [monoculum/formam ](https://github.com/monoculum/formam ) library, by Monoculum Organisation.
- all other packages comes from the [Iris Contrib Organisation ](https://github.com/iris-contrib ) and the [Go standard library ](https://github.com/golang/go ), by me & The Go Authors.
Contact
------------
Besides the fact that we have a [community chat][Chat] for questions or reports and ideas, [stackoverflow ](http://stackoverflow.com/ ) section for generic go+iris questions and the [github issues ](https://github.com/kataras/iris/issues ) for bug reports and feature requests, you can also contact with me, as a person who is always open to help you:
- [Twitter ](https://twitter.com/MakisMaropoulos )
- [Facebook ](https://facebook.com/kataras.gopher )
- [Linkedin ](https://gr.linkedin.com/in/%CE%B3%CE%B5%CF%81%CE%AC%CF%83%CE%B9%CE%BC%CE%BF%CF%82-%CE%BC%CE%B1%CF%81%CF%8C%CF%80%CE%BF%CF%85%CE%BB%CE%BF%CF%82-69839274 )
- [Youtube + Gplus ](https://www.youtube.com/user/PrimesocialNetworks )
- [Medium ](https://medium.com/@kataras )
License
------------
Unless otherwise noted, the `iris` source files are distributed
2017-01-02 20:20:17 +01:00
under the MIT License found in the [LICENSE file ](LICENSE ).
2016-12-13 07:41:30 +01:00
2016-07-01 21:57:23 +02:00
2016-07-03 16:21:57 +02:00
[Chat]: https://kataras.rocket.chat/channel/iris