Categorygithub.com/bear256/iris
repositorypackage
4.2.5+incompatible
Repository: https://github.com/bear256/iris.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README


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.

Quick Look

package main

import "github.com/kataras/iris"

func main() {
	iris.Favicon("./favicon.ico")

	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"})
	})

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

		ctx.Redirect("/user")
	})

	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
NameDescriptionUsage
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
TextText 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 Engineexample , book section
Pug/Jade Engine Pug Template Engineexample , book section
Handlebars Engine Handlebars Template Engineexample , book section
Amber Engine Amber Template Engineexample , book section
Markdown Engine Markdown Template Engineexample , book section
Basicauth Middleware HTTP Basic authenticationexample 1, example 2, book section
JWT Middleware JSON Web Tokensexample , book section
Cors Middleware Cross Origin Resource Sharing W3 specificationhow to use
Secure Middleware Facilitates some quick security winsexample
I18n Middleware Simple internationalizationexample, book section
Recovery Middleware Safety recover the station from panicexample
Logger Middleware Logs every requestexample, book section
Editor PluginAlm-tools, a typescript online IDE/Editorbook section
Typescript PluginAuto-compile client-side typescript filesbook section
OAuth,OAuth2 PluginUser Authentication was never be easier, supports >27 providersexample, book section
Iris control PluginBasic (browser-based) control over your Iris stationexample, 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.2.5

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.