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
2016-09-20 10:15:45 +03:00
context https://github.com/kataras/iris/issues/423 2016-09-15 18:59:27 +03:00
iris Developers can ignore this update. Replace the template engines with a new cross-framework package (kataras/go-template) 2016-09-02 06:05:44 +03:00
utils Replace utils/file with go-fs and go-installer, fix previous tests 2016-09-01 06:34:55 +03:00
.gitignore Add a better check for domain persistance on sessions - add the community members names who helped on website & logo on README 2016-07-30 17:24:12 +03:00
.travis.yml Fix go1.6 issue https://github.com/kataras/iris/issues/378 2016-08-23 20:41:12 +03:00
configuration_test.go Update to 4.2.0 - Configuration changes (big but old way still works, naming changes) & Implement https://github.com/kataras/iris/issues/409 2016-09-09 08:09:03 +03:00
configuration.go Ability to change the whole default router 2016-09-18 06:55:44 +03:00
context_test.go Better gzip managment, align with https://github.com/kataras/iris/issues/361 . OnError on Parties: https://github.com/kataras/iris/issues/35 2016-08-14 05:44:36 +03:00
context.go Fast silly fix from previous commit 2016-09-15 19:13:39 +03:00
CONTRIBUTING.md Rocket chat is on, Add Port() to the HTTPServer, disable subdomain persistence on subdomains when 127.0.0.1/0.0.0.0 2016-07-03 16:21:57 +02:00
DONATIONS.md Update donations section 2016-09-18 13:13:53 +03:00
HISTORY.md Update to 4.2.9 2016-09-19 01:48:37 +03:00
http_test.go Update to 4.2.0 - Configuration changes (big but old way still works, naming changes) & Implement https://github.com/kataras/iris/issues/409 2016-09-09 08:09:03 +03:00
http.go nothing special here 2016-09-18 21:57:15 +03:00
iris_test.go Ok finish the important staff, the other are already tested hundreds of times 2016-07-07 01:36:38 +02:00
iris.go Update to 4.3.0, align with latest kataras/go-websocket 2016-09-20 10:15:45 +03:00
LICENSE Change the License from MIT to Apache 2.0 (github recomemnds this on the page) 2016-09-15 19:25:09 +03:00
plugin_test.go Update to 3.0.0-pre.release, Read HISTORY.md for new features and changes 2016-07-07 02:36:48 +02:00
plugin.go Update to 4.1.7. Logger changes, read HISTORY.md 2016-09-07 07:36:23 +03:00
README.md Update to 4.3.0, align with latest kataras/go-websocket 2016-09-20 10:15:45 +03:00
ssh.go recover on ssh help message(template), (-) this happens if server machine has an old version of golang 2016-09-15 19:38:00 +03:00
template.go Replace response engines with serializers, same job but organized better, read README.md , no front-end changes if you used default engines. 2016-09-10 07:23:02 +03:00
websocket.go Update to 4.3.0, align with latest kataras/go-websocket 2016-09-20 10:15:45 +03:00


Build Status

https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg

Platforms

License

Built with GoLang


Releases

Examples

Practical Guide/Docs

Chat

The fastest backend web framework for Go.
Easy to learn, while it's highly customizable.
Ideally suited for both experienced and novice Developers.

Benchmark Wizzard July 21, 2016- Processing Time Horizontal Graph

Quick Look

package main

import "github.com/kataras/iris"

func main() {
  // serve static files, just a fav here
  iris.Favicon("./favicon.ico")

  // handle "/" - HTTP METHOD: "GET"
  iris.Get("/", func(ctx *iris.Context) {
    ctx.Render("index.html")
  })

  iris.Get("/login", func(ctx *iris.Context) {
    ctx.Render("login.html", iris.Map{"Title": "Login Page"})
  })

  // handle "/login" - HTTP METHOD: "POST"
  iris.Post("/login", func(ctx *iris.Context) {
    secret := ctx.PostValue("secret")
    ctx.Session().Set("secret", secret)

    ctx.Redirect("/user")
  })

  // handle websocket connections
  iris.Config.Websocket.Endpoint = "/mychat"
  iris.Websocket.OnConnection(func(c iris.WebsocketConnection) {
    c.Join("myroom")

    c.On("chat", func(message string){
      c.To("myroom").Emit("chat", "From "+c.ID()+": "+message)
    })
  })

  // serve requests at http://localhost:8080
  iris.Listen(":8080")
}

Installation

The only requirement is the Go Programming Language, at least v1.7.

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

If you have installation issues or you are connected to the Internet through China please, click here.

Docs & Community

If you'd like to discuss this package, or ask questions about it, feel free to

New website-docs & logo have been designed by the community*

Features

  • Focus on high performance
  • Robust routing, static, wildcard subdomains and routes.
  • Websocket API, Sessions support out of the box
  • Remote control through SSH
  • View system supporting 6+ template engines.*
  • Highly scalable response engines with pre-defined serializers
  • Live reload
  • Typescript integration + Online editor
  • OAuth, OAuth2 supporting 27+ API providers, JWT, BasicAuth
  • and many other surprises
Name Description Usage
JSON JSON Serializer (Default) example 1,example 2, book section
JSONP JSONP Serializer (Default) example 1,example 2, book section
XML XML Serializer (Default) example 1,example 2, book section
Markdown Markdown Serializer (Default) example 1,example 2, book section
Text Text Serializer (Default) example 1, book section
Binary Data Binary Data Serializer (Default) example 1, book section
HTML/Default Engine HTML Template Engine (Default) example , book section
Django Engine Django Template Engine example , book section
Pug/Jade Engine Pug Template Engine example , book section
Handlebars Engine Handlebars Template Engine example , book section
Amber Engine Amber Template Engine example , book section
Markdown Engine Markdown Template Engine example , book section
Basicauth Middleware HTTP Basic authentication example 1, example 2, book section
JWT Middleware JSON Web Tokens example , book section
Cors Middleware Cross Origin Resource Sharing W3 specification how to use
Secure Middleware Facilitates some quick security wins example
I18n Middleware Simple internationalization example, book section
Recovery Middleware Safety recover the station from panic example
Logger Middleware Logs every request example, book section
Editor Plugin Alm-tools, a typescript online IDE/Editor book section
Typescript Plugin Auto-compile client-side typescript files book section
OAuth,OAuth2 Plugin User Authentication was never be easier, supports >27 providers example, book section
Iris control Plugin Basic (browser-based) control over your Iris station example, book section

FAQ

Explore these questions or navigate to the community chat.

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.

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.

Iris is built on top of fasthttp (http basic layer), net/http middleware will not work by default on Iris, but you can convert any net/http middleware to Iris, see middleware repository to see how.

If for any personal reasons you think that Iris+fasthttp is not suitable for you, but you don't want to miss the unique features that Iris provides, you can take a look at the HTTP2 Q web framework.

Benchmarks

This Benchmark test aims to compare the whole HTTP request processing between Go web frameworks.

Benchmark Wizzard July 21, 2016- Processing Time Horizontal Graph

The results have been updated on July 21, 2016

Testing

Community should write third-party or iris base tests to the iris-contrib/tests repository. I recommend writing your API tests using this new library, httpexpect which supports Iris and fasthttp now, after my request here.

Versioning

Current: v4.3.0

Iris is an active project

Read more about Semantic Versioning 2.0.0

Todo

  • Use of the standard log.Logger instead of the iris-contrib/logger(colorful logger), make these changes to all middleware, examples and plugins.
  • Implement, even, a better way to manage configuration/options, devs will be able to set their own custom options inside there. I'm thinking of something the last days, but it will have breaking changes.
  • Implement an internal updater, as requested here.

Iris is a Community-Driven Project, waiting for your suggestions and feature requests!

I, as the author of this package, am working full time on this package, no time to any other job, so if you're willing to donate and you can afford it please click here, thank you!

People

The big thanks goes to all people who help building this framework with feature-requests & bug reports!

The author of Iris is @kataras.

Contributing

If you are interested in contributing to the Iris project, please see the document CONTRIBUTING.

License

This project is licensed under the Apache License, Version 2.0.

License can be found here.