2016-07-01 01:13:21 +02:00
[![Iris Logo ](https://raw.githubusercontent.com/iris-contrib/website/gh-pages/assets/iris_full_logo_2.png )](http://iris-go.com)
2016-05-30 16:08:09 +02:00
2016-07-01 21:57:23 +02:00
[![Travis Widget]][Travis] [![Release Widget]][Release] [![Report Widget]][Report] [![License Widget]][License] [![Chat Widget]][Chat] [![Documentation Widget]][Documentation]
2016-05-30 16:08:09 +02:00
2016-07-01 22:06:56 +02:00
The [fastest ](#benchmarks ) web framework for Go.
2016-06-26 19:25:55 +02:00
2016-07-01 00:34:44 +02:00
2016-07-01 22:06:56 +02:00
[![Alt: The results have been updated on July 1, 2016 ](https://raw.githubusercontent.com/smallnest/go-web-framework-benchmark/master/benchmark.png )](https://github.com/smallnest/go-web-framework-benchmark)
2016-07-01 00:34:44 +02:00
2016-06-07 12:11:34 +02:00
2016-05-30 16:08:09 +02:00
2016-06-21 15:27:20 +02:00
2016-06-26 19:25:55 +02:00
```bash
$ cat render_json.go
2016-05-30 16:08:09 +02:00
```
```go
package main
2016-06-26 19:25:55 +02:00
import "github.com/kataras/iris"
2016-05-30 16:08:09 +02:00
func main() {
iris.Get("/hi_json", func(c *iris.Context) {
2016-06-21 15:07:49 +02:00
c.JSON(iris.StatusOK, iris.Map{
"Name": "Iris",
"Born": "13 March 2016",
2016-06-26 19:25:55 +02:00
"Stars": 3693,
2016-05-30 16:08:09 +02:00
})
})
2016-06-21 15:27:20 +02:00
iris.Listen(":8080")
}
```
2016-06-26 19:31:18 +02:00
> Learn more about [render](https://kataras.gitbooks.io/iris/content/render.html)
2016-06-21 15:27:20 +02:00
2016-06-26 19:25:55 +02:00
```bash
2016-06-26 19:31:18 +02:00
$ iris run render_json.go
2016-06-26 19:25:55 +02:00
```
2016-06-26 19:31:18 +02:00
> Runs & monitors for file changes, learn more about [cli](https://github.com/kataras/iris/tree/master/iris).
2016-05-30 16:08:09 +02:00
Installation
------------
2016-06-26 15:26:44 +02:00
The only requirement is the [Go Programming Language ](https://golang.org/dl ), at least v1.6
2016-05-30 16:08:09 +02:00
2016-06-26 19:25:55 +02:00
```bash
2016-06-26 19:31:18 +02: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-06-26 19:31:18 +02:00
>If you have installation issues and you are connected to the Internet through China please, [click here ](https://kataras.gitbooks.io/iris/content/install.html ).
2016-05-30 16:08:09 +02:00
2016-06-15 23:17:23 +02:00
FAQ
------------
2016-07-01 22:06:56 +02:00
Explore [these questions ](https://github.com/kataras/iris/issues?q=label%3Aquestion ) or navigate to the [community chat][Chat].
2016-06-15 23:17:23 +02:00
2016-05-30 16:08:09 +02:00
Features
------------
- Focus on high performance
2016-06-24 00:34:49 +02:00
- Robust routing supports static and wildcard subdomains
2016-06-28 11:50:26 +02:00
- View system supporting [6+ ](https://kataras.gitbooks.io/iris/content/render_templates.html ) template engines
2016-05-30 16:08:09 +02:00
- Highly scalable Websocket API with custom events
- Sessions support with GC, memory & redis providers
- Middlewares & Plugins were never be easier
- Full REST API
- Custom HTTP Errors
2016-06-24 00:34:49 +02:00
- Typescript compiler + Browser-based editor
2016-05-30 16:08:09 +02:00
- Content negotiation & streaming
- Transport Layer Security
2016-06-21 01:05:58 +02:00
- [Reload ](https://github.com/kataras/iris/tree/master/iris#run ) on source code changes
2016-06-24 07:29:08 +02:00
- OAuth, OAuth2 supporting 27+ API providers
- JSON Web Tokens
2016-06-24 00:34:49 +02:00
- and more
2016-05-30 16:08:09 +02:00
2016-06-24 00:34:49 +02:00
< img src = "https://raw.githubusercontent.com/iris-contrib/website/gh-pages/assets/arrowdown.png" width = "72" / >
| Name | Description | Usage |
| ------------------|:---------------------:|-------:|
| [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://kataras.gitbooks.io/iris/content/basic-authentication.html ) |
2016-06-24 07:29:08 +02:00
| [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://kataras.gitbooks.io/iris/content/jwt.html ) |
2016-06-24 00:34:49 +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 ) |
| [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://kataras.gitbooks.io/iris/content/middleware-internationalization-and-localization.html ) |
| [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 ) |
| [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://kataras.gitbooks.io/iris/content/logger.html ) |
| [Editor Plugin ](https://github.com/iris-contrib/plugin/tree/master/editor ) | Alm-tools, a typescript online IDE/Editor | [book section ](https://kataras.gitbooks.io/iris/content/plugin-editor.html ) |
| [Typescript Plugin ](https://github.com/iris-contrib/plugin/tree/master/typescript ) | Auto-compile client-side typescript files | [book section ](https://kataras.gitbooks.io/iris/content/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://kataras.gitbooks.io/iris/content/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://kataras.gitbooks.io/iris/content/plugin-iriscontrol.html ) |
2016-05-30 16:08:09 +02:00
Docs & Community
------------
2016-07-01 00:40:05 +02:00
< a href = "https://www.gitbook.com/book/kataras/iris/details" > < img align = "right" width = "185" src = "https://raw.githubusercontent.com/iris-contrib/website/gh-pages/assets/book/cover_1.png" > < / a >
2016-05-30 16:08:09 +02:00
- Read the [book ](https://www.gitbook.com/book/kataras/iris/details ) or [wiki ](https://github.com/kataras/iris/wiki )
- Take a look at the [examples ](https://github.com/iris-contrib/examples )
2016-06-25 15:20:49 +02:00
- [HISTORY ](https://github.com//kataras/iris/tree/master/HISTORY.md ) file is your best friend.
2016-05-30 16:08:09 +02:00
If you'd like to discuss this package, or ask questions about it, feel free to
* Post an issue or idea [here ](https://github.com/kataras/iris/issues )
2016-07-01 21:57:23 +02:00
* [Chat][Chat]
2016-05-30 16:08:09 +02:00
Open debates
2016-06-01 03:45:11 +02:00
- [Contribute: New website and logo for Iris ](https://github.com/kataras/iris/issues/153 )
2016-05-30 16:08:09 +02:00
- [E-book Cover - Which one you suggest? ](https://github.com/kataras/iris/issues/67 )
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.
2016-07-01 22:06:56 +02:00
## Benchmarks
2016-05-30 16:08:09 +02:00
[This Benchmark suite ](https://github.com/smallnest/go-web-framework-benchmark ) aims to compare the whole HTTP request processing between Go web frameworks.
2016-07-01 00:34:44 +02:00
**New results just came out:**
![Benchmark Wizzard Processing Time Horizontal Graph ](https://raw.githubusercontent.com/smallnest/go-web-framework-benchmark/master/benchmark.png )
**The results have been updated on July 1, 2016**
2016-05-30 16:08:09 +02:00
[Please click here to view all detailed benchmarks. ](https://github.com/smallnest/go-web-framework-benchmark )
2016-06-24 01:01:53 +02:00
Testing
------------
Tests are located to the [iris-contrib/tests repository ](https://github.com/iris-contrib/tests ), community should write some code there!
I recommend writing your API tests using this new library, [httpexpect ](https://github.com/gavv/httpexpect ) which supports Iris and fasthttp now, after my request [here ](https://github.com/gavv/httpexpect/issues/2 ).
2016-05-30 16:08:09 +02:00
Versioning
------------
2016-06-28 11:50:26 +02:00
Current: **v3.0.0-rc.4**
2016-05-30 16:08:09 +02:00
> Iris is an active project
Read more about Semantic Versioning 2.0.0
- http://semver.org/
- https://en.wikipedia.org/wiki/Software_versioning
- https://wiki.debian.org/UpstreamGuide#Releases_and_Versions
Todo
------------
> for the next release 'v3'
2016-07-01 22:14:16 +02:00
- [x] [Dynamic/Wildcard subdomains ](https://kataras.gitbooks.io/iris/content/subdomains.html )
- [x] [Create server & client side ](https://kataras.gitbooks.io/iris/content/package-websocket.html ) (js) library for .on('event', func action(...)) / .emit('event')... (like socket.io but supports only websocket)
- [x] [Create a view system ](https://kataras.gitbooks.io/iris/content/render_templates.html ) supporting different types of template engines
- [x] Extend, test and publish to the public the [Iris' cmd ](https://github.com/kataras/iris/tree/master/iris )[* ](https://github.com/kataras/rizla )
- [ ] Complete the API tests, community can help also, tests are located [here ](https://github.com/iris-contrib/tests ).
If you're **willing to donate** click [here ](DONATIONS.md )!
2016-05-30 16:08:09 +02:00
People
------------
2016-06-25 04:54:52 +02:00
A big thanks goes to [all people ](https://github.com/kataras/iris/issues?utf8=%E2%9C%93&q=label%3A%22feature+request%22 ) who help building this framework with feature-requests & bug reports!
2016-06-16 04:24:01 +02:00
The author of Iris is [@kataras ](https://github.com/kataras ).
2016-05-30 16:08:09 +02:00
2016-06-25 04:54:52 +02:00
Contributing
------------
If you are interested in contributing to the Iris project, please see the document [CONTRIBUTING ](https://github.com/kataras/iris/blob/master/CONTRIBUTING.md ).
2016-06-26 07:25:05 +02:00
License
------------
This project is licensed under the MIT License.
License can be found [here ](LICENSE ).
2016-07-01 21:57:23 +02:00
[Travis Widget]: https://img.shields.io/travis/kataras/iris.svg?style=flat-square
[Travis]: http://travis-ci.org/kataras/iris
[License Widget]: https://img.shields.io/badge/license-MIT%20%20License%20-E91E63.svg?style=flat-square
[License]: https://github.com/kataras/iris/blob/master/LICENSE
[Release Widget]: https://img.shields.io/badge/release-v3.0.0--rc.4-blue.svg?style=flat-square
[Release]: https://github.com/kataras/iris/releases
[Chat Widget]: https://img.shields.io/badge/community-chat-00BCD4.svg?style=flat-square
2016-07-03 07:15:09 +02:00
[Chat]: https://gitter.im/kataras/iris
2016-07-01 21:57:23 +02:00
[ChatMain]: https://kataras.rocket.chat/channel/iris
[ChatAlternative]: https://gitter.im/kataras/iris
[Report Widget]: https://img.shields.io/badge/report%20card-A%2B-F44336.svg?style=flat-square
[Report]: http://goreportcard.com/report/kataras/iris
[Documentation Widget]: https://img.shields.io/badge/documentation-reference-5272B4.svg?style=flat-square
[Documentation]: https://www.gitbook.com/book/kataras/iris/details
[Language Widget]: https://img.shields.io/badge/powered_by-Go-3362c2.svg?style=flat-square
[Language]: http://golang.org
[Platform Widget]: https://img.shields.io/badge/platform-Any--OS-gray.svg?style=flat-square