The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio 🚀
Go to file
kataras 56aa3de645 Update to 8.0.3 | Request logger improvements, error handlers improvements. Read HISTORY.md
Former-commit-id: fb5eca0dc955d8c07fdba35b47068008565dbbd1
2017-07-16 13:58:10 +03:00
_examples Update to 8.0.3 | Request logger improvements, error handlers improvements. Read HISTORY.md 2017-07-16 13:58:10 +03:00
.github Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
cache Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
context Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
core Update to 8.0.3 | Request logger improvements, error handlers improvements. Read HISTORY.md 2017-07-16 13:58:10 +03:00
httptest Update to 8.0.2. Read HISTORY.md for the surpise 2017-07-15 17:40:29 +03:00
middleware Update to 8.0.3 | Request logger improvements, error handlers improvements. Read HISTORY.md 2017-07-16 13:58:10 +03:00
sessions modify the targeted test for gorilla/securecookie integration with iris session manager 🍥 2017-07-11 18:09:32 +03:00
typescript Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
view Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
websocket remove deprecated code from websocket/_examples/secure/main.go 2017-07-12 14:36:26 +03:00
.gitattributes Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
.gitignore Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
.travis.yml Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
ACQUIRED_HISTORY.md Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
AUTHORS Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
configuration.go add example link for IgnoreServerErrors https://github.com/kataras/iris/blob/master/HISTORY.md#th-13-july-2017--v801 🔉 2017-07-13 16:38:35 +03:00
context.go Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
doc.go Update to 8.0.3 | Request logger improvements, error handlers improvements. Read HISTORY.md 2017-07-16 13:58:10 +03:00
Dockerfile Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
Dockerfile.build Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
HISTORY.md Update to 8.0.3 | Request logger improvements, error handlers improvements. Read HISTORY.md 2017-07-16 13:58:10 +03:00
iris.go Update to 8.0.3 | Request logger improvements, error handlers improvements. Read HISTORY.md 2017-07-16 13:58:10 +03:00
learn.jpg.REMOVED.git-id Split in three the _examples/tutorial/url-shortener and add the link of the updated article 2017-07-11 19:09:08 +03:00
LICENSE Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded 2017-07-10 18:32:42 +03:00
logo_white_35_24.png Publish the new version ✈️ | Look description please! 2017-06-03 23:22:52 +03:00
README.md Update to 8.0.3 | Request logger improvements, error handlers improvements. Read HISTORY.md 2017-07-16 13:58:10 +03:00

Logo created by @santoshanand Iris

Iris is a fast, simple and efficient micro web framework for Go. It provides a beautifully expressive and easy to use foundation for your next website, API, or distributed app.

Web applications powered by Iris run everywhere, even from an android device.

build status report card godocs get support view examples chat

🔥 Hot features

  • Focus on high performance
  • Easy Fluent API
  • Highly customizable
  • Robust routing and middleware ecosystem
    • build RESTful APIs with iris unique expressionist path interpreter
    • dynamic path parameterized or wildcard routes are not conflict with static routes
    • remove trailing slash from the URL with option to redirect
    • virtual hosts and subdomains made easy
    • group API's and static or even dynamic subdomains
    • net/http and negroni-like handlers are compatible via iris.FromStd
    • learn the reasons that differ from what you've seen so far
  • Automatically install and serve certificates from https://letsencrypt.org
  • Request-Scoped Transactions
  • 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
  • Graceful shutdown
  • Limit request body
  • Localization i18N
  • Serve static and embedded files
  • Cache
  • Log requests
  • Customizable format and output for the logger
  • Customizable HTTP errors
  • Compression (Gzip)
  • Authentication
  • OAuth, OAuth2 supporting 27+ popular websites
  • JWT
  • Basic Authentication
  • HTTP Sessions. You can still use your favorite
  • HTTP to HTTPS
  • HTTP to HTTPS WWW
  • Highly scalable rich content render (Markdown, JSON, JSONP, XML...)
  • Websocket-only API similar to socket.io. You can still use your favorite
  • Hot Reload on source code changes*
  • Typescript integration + Web IDE
  • And many other things that will surprise you

Third-party source for transparency.

📑 Table of contents

🚀 Installation

The only requirement is the Go Programming Language, at least version 1.8

$ go get -u github.com/kataras/iris

iris takes advantage of the vendor directory feature. You get truly reproducible builds, as this method guards against upstream renames and deletes.

// file: main.go
package main
import (
    "github.com/kataras/iris"
    "github.com/kataras/iris/context"
)
func main() {
    app := iris.New()
    // Load all templates from the "./templates" folder
    // where extension is ".html" and parse them
    // using the standard `html/template` package.
    app.RegisterView(iris.HTML("./templates", ".html"))

    // Method:    GET
    // Resource:  http://localhost:8080
    app.Get("/", func(ctx context.Context) {
        // Bind: {{.message}} with "Hello world!"
        ctx.ViewData("message", "Hello world!")
        // Render template file: ./templates/hello.html
        ctx.View("hello.html")
    })

    // Start the server using a network address and block.
    app.Run(iris.Addr(":8080"))
}
<!-- file: ./templates/hello.html -->
<html>
<head>
    <title>Hello Page</title>
</head>
<body>
    <h1>{{.message}}</h1>
</body>
</html>
$ go run main.go
> Now listening on: http://localhost:8080
> Application started. Press CTRL+C to shut down.
Hello World with Go 1.9

If you've installed Go 1.9 then you can omit the github.com/kataras/iris/context package from the imports statement.

// +build go1.9

package main

import "github.com/kataras/iris"

func main() {
	app := iris.New()
	app.RegisterView(iris.HTML("./templates", ".html"))
	
	app.Get("/", func(ctx iris.Context) {
		ctx.ViewData("message", "Hello world!")
		ctx.View("hello.html")
	})

	app.Run(iris.Addr(":8080"))
}

We expect Go version 1.9 to be released in August, however you can install Go 1.9 beta today.

Installing Go 1.9beta2

  1. Go to https://golang.org/dl/#go1.9beta2
  2. Download a compatible, with your OS, archieve, i.e go1.9beta2.windows-amd64.zip
  3. Unzip the contents of go1.9beta2.windows-amd64.zip/go folder to your $GOROOT, i.e C:\Go
  4. Open a terminal and execute go version, it should output the go1.9beta2 version, i.e:
C:\Users\hiveminded>go version
go version go1.9beta2 windows/amd64
Why another new web framework?

iris is easy, it has a familiar API while in the same has far more features than Gin or Martini.

You own your code —it will never generate (unfamiliar) code for you, like Beego, Revel and Buffalo do.

It's not just-another-router but its overall performance is equivalent with something like httprouter.

Unlike fasthttp, iris provides full HTTP/2 support for free.

Compared to the rest open source projects, this one is very active and you get answers almost immediately.

👥 Community

The most useful community repository for iris developers is the iris-contrib/middleware which contains some HTTP handlers that can help you finish a lot of your tasks even easier.

$ go get -u github.com/iris-contrib/middleware/...

Feel free to put your own middleware there!

Join the welcoming community of fellow iris developers in rocket.chat.

📖 Learn

The awesome iris community is always adding new examples, _examples is a great place to get started!

Read the godocs for a better understanding.

🤔 Philosophy

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 apache+nginx itself.

iris does not force you to use any specific ORM. With support for the most popular template engines, websocket server and a fast sessions manager you can quickly craft your perfect application.

💙 Support

  • Post a feature request or report a bug
  • and watch the public repository, will keep you up to date
  • 🌎 publish an article or share a tweet about your personal experience with iris

📌 Version

Current: 8.0.3

Each new release is pushed to the master. It stays there until the next version. When a next version is released then the previous version goes to its own branch with gopkg.in as its import path (and its own vendor folder), in order to keep it working "for-ever".

Changelog of the current version can be found at the HISTORY file.

Should I upgrade my iris?

Developers are not forced to use the latest iris version, they can use any version in production, they can update at any time they want.

Testers should upgrade immediately, if you're willing to use iris in production you can wait a little more longer, transaction should be as safe as possible.

Where can I find older versions?

Previous versions can be found at releases page.

🥇 People

The original author of iris is Gerasimos Maropoulos

The current lead maintainer is Bill Qeras, Jr.

List of all contributors