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
2017-02-05 20:26:40 +02:00
.github Update to 6.1.2 2017-01-13 05:57:46 +02:00
docs Go v1.8 and the upcoming Iris version notes on HISTORY.md. 2017-02-05 20:26:40 +02:00
examples Nothing special here 2017-01-25 22:19:06 +02:00
httptest Happy new year! Update to 6.0.0 | HTTP/2 full support. https://github.com/kataras/iris/issues/565 2017-01-02 21:20:17 +02:00
iris Go v1.8 and the upcoming Iris version notes on HISTORY.md. 2017-02-05 20:26:40 +02:00
middleware Fix iris run main.go not worked properly on some editors. Add notes for next version. Read HISTORY.md 2017-02-05 18:13:24 +02:00
plugins Nothing special here 2017-01-25 22:19:06 +02:00
utils nothing special here 2016-12-13 07:12:58 +02:00
.gitignore For unknown reasons I can't use desktop github yet, let's try this 2016-12-04 06:41:23 +02:00
.travis.yml Remove travis:tip 2016-09-23 07:54:15 +03:00
configuration_test.go Happy new year! Update to 6.0.0 | HTTP/2 full support. https://github.com/kataras/iris/issues/565 2017-01-02 21:20:17 +02:00
configuration.go Add DisableBodyConsumptionOnUnmarshal configuration field as discussed on [chat](https://kataras.rocket.chat/channel/iris). Read HISTORY.md 2017-01-30 12:35:43 +02:00
context_test.go Add DisableBodyConsumptionOnUnmarshal configuration field as discussed on [chat](https://kataras.rocket.chat/channel/iris). Read HISTORY.md 2017-01-30 12:35:43 +02:00
context.go Fix iris run main.go not worked properly on some editors. Add notes for next version. Read HISTORY.md 2017-02-05 18:13:24 +02:00
DONATIONS.md Update DONATIONS.md 2017-01-18 13:56:55 +02:00
HISTORY.md Go v1.8 and the upcoming Iris version notes on HISTORY.md. 2017-02-05 20:26:40 +02:00
http_test.go Offling routing and prioritize others before static handlers https://github.com/kataras/iris/issues/585 2017-01-12 10:24:27 +02:00
http.go Fix iris run main.go not worked properly on some editors. Add notes for next version. Read HISTORY.md 2017-02-05 18:13:24 +02:00
iris.go Add DisableBodyConsumptionOnUnmarshal configuration field as discussed on [chat](https://kataras.rocket.chat/channel/iris). Read HISTORY.md 2017-01-30 12:35:43 +02:00
LICENSE Happy new year! Update to 6.0.0 | HTTP/2 full support. https://github.com/kataras/iris/issues/565 2017-01-02 21:20:17 +02:00
logo.jpg Fix https://github.com/iris-contrib/middleware/issues/13 2016-09-30 18:48:48 +03:00
plugin_test.go Nothing special here, read HISTORY.md 2017-01-10 15:03:02 +02:00
plugin.go Catch os.Interrupt signal with iris.PostInterrupt example added in comments. 2017-01-11 18:01:29 +02:00
README.md Go v1.8 and the upcoming Iris version notes on HISTORY.md. 2017-02-05 20:26:40 +02:00
response_recorder.go Standby for Go v1.8. Read HISTORY.md for previous commits: iris.DestroyAllSessions/DestroySessionByID. 2017-01-08 07:40:43 +02:00
response_writer_test.go Add a response recorder test to showcase its usage 2017-01-10 17:30:03 +02:00
response_writer.go Update donations 2017-01-10 18:29:38 +02:00
template.go Update to 6.0.7 2017-01-10 08:54:39 +02:00
transactions.go Nothing special here, read HISTORY.md 2017-01-10 15:03:02 +02:00
webfs.go Offling routing and prioritize others before static handlers https://github.com/kataras/iris/issues/585 2017-01-12 10:24:27 +02:00
websocket.go https://github.com/iris-contrib/plugin/blob/master/cors/plugin.go#L28 2017-01-27 14:25:48 +02:00

Logo created by an Iris community member, @OneebMalik

Build Status

http://goreportcard.com/report/kataras/iris

Built with GoLang

Cross framework

Donation


CHANGELOG/HISTORY

Examples

Practical Guide/Docs

Chat

Iris is the fastest HTTP/2 web framework written in Go.
Easy to learn while it's highly customizable, ideally suited for
both experienced and novice developers.

If you're coming from Node.js world, this is the expressjs for the Go Programming Language.

What people say What people say

Installation

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

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

Benchmark Wizzard July 21, 2016- Processing Time Horizontal Graph

Overview

package main

import (
	"github.com/kataras/go-template/html"
	"github.com/kataras/iris"
)

func main() {
	app := iris.New()
	// 6 template engines are supported out-of-the-box:
	//
	// - standard html/template
	// - amber
	// - django
	// - handlebars
	// - pug(jade)
	// - markdown
	//
	// Use the html standard engine for all files inside "./views" folder with extension ".html"
	// Defaults to:
	app.UseTemplate(html.New()).Directory("./views", ".html")

	// http://localhost:6111
	// Method: "GET"
	// Render ./views/index.html
	app.Get("/", func(ctx *iris.Context) {
		ctx.Render("index.html", nil)
	})

	// Group routes, optionally: share middleware, template layout and custom http errors.
	userAPI := app.Party("/users", userAPIMiddleware).
		Layout("layouts/userLayout.html")
	{
		// Fire userNotFoundHandler when Not Found
		// inside http://localhost:6111/users/*anything
		userAPI.OnError(404, userNotFoundHandler)

		// http://localhost:6111/users
		// Method: "GET"
		userAPI.Get("/", getAllHandler)

		// http://localhost:6111/users/42
		// Method: "GET"
		userAPI.Get("/:id", getByIDHandler)

		// http://localhost:6111/users
		// Method: "POST"
		userAPI.Post("/", saveUserHandler)
	}

	// Start the server at 0.0.0.0:6111
	app.Listen(":6111")
}

func getByIDHandler(ctx *iris.Context) {
	// take the :id from the path, parse to integer
	// and set it to the new userID local variable.
	userID, _ := ctx.ParamInt("id")

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

TIP: Execute iris run main.go to enable hot-reload on .go source code changes.

TIP: Set app.Config.IsDevelopment = true to monitor the template changes.

Documentation

Testing

You can find RESTFUL test examples by navigating to the following links:

FAQ

Explore these questions and join to our 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. Keep note that, today, iris is faster than nginx itself.

Iris does not force you to use any specific ORM or template engine. With support for the most used template engines (6+), you can quickly craft the perfect application.

People & Support

The author of Iris is @kataras.

The Success of Iris belongs to YOU with your bug reports and feature requests that made this Framework so Unique.

Who is kataras?

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, will help you to follow the upcoming features.
  • Donate, if you can afford any cost.
  • Write an article about Iris or even post a Tweet.

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

Contact

Besides the fact that we have a community chat for questions or reports and ideas, stackoverflow section for generic go+iris questions and the github issues for bug reports and feature requests, you can also contact with me, as a person who is always open to help you:

Versioning

Current: v6.1.3

v5: https://github.com/kataras/iris/tree/5.0.0

License

Unless otherwise noted, the source files are distributed under the MIT License found in the LICENSE file.