Go Other
Latest commit c833867 Jan 22, 2018 @kataras kataras Corrected spelling from simmilate to simulate by @HintikkaKimmo via PR
…#883

corrected spelling for example docs
Permalink
Failed to load latest commit information.
.github add Greek language side by side with Chinese and Russian Jan 5, 2018
_benchmarks fix _benchmarks/iris-mvc-templates Dec 31, 2017
_examples Corrected spelling from simmilate to simulate by @HintikkaKimmo via PR Jan 22, 2018
cache add an `app.View` example for parsing and writing templates outside o… Jan 22, 2018
context NEW: `Application#SubdomainRedirect`. Example: https://github.com/kat… Jan 20, 2018
core support multi-level subdomains redirect, see previous commit for the … Jan 20, 2018
hero linting, 99% is not fine let's do it 100% Jan 4, 2018
httptest Update to version 8.5.5 | Read HISTORY.md Nov 2, 2017
middleware fix #879 by @martinnagelberg Jan 21, 2018
mvc add `GetRoute` for MVC Controllers. Give the chance to change rsome r… Dec 30, 2017
sessions Happy New Year to everybody! Version 10 Published. Read HISTORY.md Dec 31, 2017
typescript add a code snippet as a very simplistic overview and update the licen… Dec 31, 2017
vendor upstream update for crypto/acme relative to iris.AutoTLS Jan 15, 2018
view Update to version 10.0.1 - read more at: https://github.com/kataras/i… Jan 14, 2018
websocket a simple simplify came from the previous PR that merged Jan 5, 2018
.gitattributes ok the new mvc system works great, all tests done and almost x3 small… Dec 10, 2017
.gitignore app. SPA from router wrapper to a simple handler, works faster now. I… Nov 10, 2017
.travis.yml thinking a new way of displaying the README, give no readme hand-writ… Dec 24, 2017
AUTHORS Update to version 8.5.5 | Read HISTORY.md Nov 2, 2017
CODE_OF_CONDUCT.md Update to version 8.5.5 | Read HISTORY.md Nov 2, 2017
CONTRIBUTING.md nothing tremendous here Jan 9, 2018
Dockerfile Update to version 8.5.5 | Read HISTORY.md Nov 2, 2017
Dockerfile.build Update to version 8.5.5 | Read HISTORY.md Nov 2, 2017
FAQ.md fix #879 by @martinnagelberg Jan 21, 2018
Gopkg.lock upstream update for crypto/acme relative to iris.AutoTLS Jan 15, 2018
Gopkg.toml Fix dep dependency Jan 16, 2018
HISTORY.md add an `app.View` example for parsing and writing templates outside o… Jan 22, 2018
HISTORY_GR.md add an `app.View` example for parsing and writing templates outside o… Jan 22, 2018
HISTORY_ZH.md Update HISTORY_ZH.md Jan 16, 2018
LICENSE add a code snippet as a very simplistic overview and update the licen… Dec 31, 2017
README.md Security fix for TLS-enabled servers, please read https://github.com/… Jan 16, 2018
README_GR.md Security fix for TLS-enabled servers, please read https://github.com/… Jan 16, 2018
README_RU.md NEW: `Application#SubdomainRedirect`. Example: https://github.com/kat… Jan 20, 2018
README_ZH.md Security fix for TLS-enabled servers, please read https://github.com/… Jan 16, 2018
VERSION Security fix for TLS-enabled servers, please read https://github.com/… Jan 16, 2018
configuration.go NEW: `Application#SubdomainRedirect`. Example: https://github.com/kat… Jan 20, 2018
configuration_test.go able to share static configuration between multiple server instances … Nov 6, 2017
deprecated.go fix #861 Jan 4, 2018
doc.go ok almost finished. We're good at deadlines eventually. Tomorrow at 2… Dec 31, 2017
go19.go remove the old 'mvc' folder - examples are not changed yet - add the … Dec 15, 2017
iris.go support multi-level subdomains redirect, see previous commit for the … Jan 20, 2018

README.md

Iris Web Framework

build status report card chat view examples release

Iris is a fast, simple yet fully featured and very efficient web framework for Go.

Iris provides a beautifully expressive and easy to use foundation for your next website or API.

Finally, a real expressjs equivalent for the Go Programming Language.

Learn what others say about Iris and star this github repository to stay up to date.

Backers

Thank you to all our backers! 🙏 Become a backer

$ cat example.go
package main

import "github.com/kataras/iris"

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

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

    // Method:    GET
    // Resource:  http://localhost:8080/user/42
    //
    // Need to use a custom regexp instead?
    // Easy,
    // just mark the parameter's type to 'string'
    // which accepts anything and make use of
    // its `regexp` macro function, i.e:
    // app.Get("/user/{id:string regexp(^[0-9]+$)}")
    app.Get("/user/{id:long}", func(ctx iris.Context) {
        userID, _ := ctx.Params().GetInt64("id")
        ctx.Writef("User ID: %d", userID)
    })

    // Start the server using a network address.
    app.Run(iris.Addr(":8080"))
}

Learn more about path parameter's types by clicking here

<!-- file: ./views/hello.html -->
<html>
<head>
    <title>Hello Page</title>
</head>
<body>
    <h1>{{.message}}</h1>
</body>
</html>
$ go run example.go
Now listening on: http://localhost:8080
Application Started. Press CTRL+C to shut down.
_

Installation

The only requirement is the Go Programming Language

$ 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.

Iris vs .NET Core(C#) vs Node.js (Express)

Updated at: Tuesday, 21 November 2017

Benchmarks from third-party source over the rest web frameworks

Comparison with other frameworks

Support

  • HISTORY file is your best friend, it contains information about the latest features and changes
  • Did you happen to find a bug? Post it at github issues
  • Do you have any questions or need to speak with someone experienced to solve a problem at real-time? Join us to the community chat
  • Complete our form-based user experience report by clicking here
  • Do you like the framework? Tweet something about it! The People have spoken:



For more information about contributing to the Iris project please check the CONTRIBUTING.md file.

List of all Contributors

Learn

First of all, the most correct way to begin with a web framework is to learn the basics of the programming language and the standard http capabilities, if your web application is a very simple personal project without performance and maintainability requirements you may want to proceed just with the standard packages. After that follow the guidelines:

  • Navigate through 100+1 examples and some iris starter kits we crafted for you
  • Read the godocs for any details
  • Prepare a cup of coffee or tea, whatever pleases you the most, and read some articles we found for you

Iris starter kits

  1. A basic web app built in Iris for Go
  2. A mini social-network created with the awesome Iris💖💖
  3. Iris isomorphic react/hot reloadable/redux/css-modules starter kit
  4. Demo project with react using typescript and Iris
  5. Self-hosted Localization Management Platform built with Iris and Angular
  6. Iris + Docker and Kubernetes
  7. Quickstart for Iris with Nanobox
  8. A Hasura starter project with a ready to deploy Golang hello-world web app with IRIS

Did you build something similar? Let us know!

Middleware

Iris has a great collection of handlers[1][2] that you can use side by side with your web apps. However you are not limited to them - you are free to use any third-party middleware that is compatible with the net/http package, _examples/convert-handlers will show you the way.

Iris, unlike others, is 100% compatible with the standards and that's why the majority of the big companies that adapt Go to their workflow, like a very famous US Television Network, trust Iris; it's always up-to-date and it will be aligned with the std net/http package which is modernized by the Go Author on each new release of the Go Programming Language forever.

Articles

Get hired

There are many companies and start-ups looking for Go web developers with Iris experience as requirement, we are searching for you every day and we post those information via our facebook page, like the page to get notified, we have already posted some of them.

Sponsors

Thank you to all our sponsors! (please ask your company to also support this open source project by becoming a sponsor)

License

Iris is licensed under the 3-Clause BSD License. Iris is 100% free and open-source software.

For any questions regarding the license please send e-mail.