mirror of
https://github.com/kataras/iris.git
synced 2025-02-09 18:46:19 +01:00
iris run on first view
This commit is contained in:
parent
6391ba04ca
commit
a89498e448
31
README.md
31
README.md
|
@ -18,48 +18,51 @@
|
||||||
[Language]: http://golang.org
|
[Language]: http://golang.org
|
||||||
[Platform Widget]: https://img.shields.io/badge/platform-Any--OS-gray.svg?style=flat-square
|
[Platform Widget]: https://img.shields.io/badge/platform-Any--OS-gray.svg?style=flat-square
|
||||||
|
|
||||||
The fastest web framework for Go. Easy to [learn](https://www.gitbook.com/book/kataras/iris/details) while providing robust set of features for building modern web applications.
|
The fastest web framework for Go.
|
||||||
|
|
||||||
|
[Easy](https://github.com/iris-contrib/examples) to [learn](https://www.gitbook.com/book/kataras/iris/details) while, at the same time, providing robust set of features for building modern web applications.
|
||||||
|
|
||||||
[![Benchmark Wizzard Processing Time Horizontal Graph](https://raw.githubusercontent.com/iris-contrib/website/cf71811e6acb2f9bf1e715e25660392bf090b923/assets/benchmark_horizontal_transparent.png)](https://github.com/smallnest/go-web-framework-benchmark)
|
[![Benchmark Wizzard Processing Time Horizontal Graph](https://raw.githubusercontent.com/iris-contrib/website/cf71811e6acb2f9bf1e715e25660392bf090b923/assets/benchmark_horizontal_transparent.png)](https://github.com/smallnest/go-web-framework-benchmark)
|
||||||
|
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
$ cat test_json.go
|
$ cat render_json.go
|
||||||
```
|
```
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
import "github.com/kataras/iris"
|
||||||
import (
|
|
||||||
"github.com/kataras/iris"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
// render JSON
|
|
||||||
iris.Get("/hi_json", func(c *iris.Context) {
|
iris.Get("/hi_json", func(c *iris.Context) {
|
||||||
c.JSON(iris.StatusOK, iris.Map{
|
c.JSON(iris.StatusOK, iris.Map{
|
||||||
"Name": "Iris",
|
"Name": "Iris",
|
||||||
"Born": "13 March 2016",
|
"Born": "13 March 2016",
|
||||||
"Stars": 3533,
|
"Stars": 3693,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
iris.Listen(":8080")
|
iris.Listen(":8080")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ iris run render_json.go # run & restart the server on code changes.
|
||||||
|
```
|
||||||
|
|
||||||
> Learn more about [render](https://kataras.gitbooks.io/iris/content/render.html).
|
> Learn more about [render](https://kataras.gitbooks.io/iris/content/render.html).
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
The only requirement is the [Go Programming Language](https://golang.org/dl), at least v1.6
|
The only requirement is the [Go Programming Language](https://golang.org/dl), at least v1.6
|
||||||
|
|
||||||
`$ go get -u github.com/kataras/iris/iris`
|
```bash
|
||||||
|
$ go get -u github.com/kataras/iris/iris`
|
||||||
|
```
|
||||||
|
|
||||||
>If you are connected to the Internet through China [click here](https://kataras.gitbooks.io/iris/content/install.html)
|
>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).
|
||||||
|
|
||||||
FAQ
|
FAQ
|
||||||
------------
|
------------
|
||||||
You can find answers by exploring [these questions](https://github.com/kataras/iris/issues?q=label%3Aquestion).
|
Explore [these questions](https://github.com/kataras/iris/issues?q=label%3Aquestion) or navigate [here](https://gitter.im/kataras/iris).
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
|
@ -164,7 +167,7 @@ Todo
|
||||||
- [x] Create server & client side (js) library for .on('event', func action(...)) / .emit('event')... (like socket.io but supports only websocket).
|
- [x] Create server & client side (js) library for .on('event', func action(...)) / .emit('event')... (like socket.io but supports only websocket).
|
||||||
- [x] Create a view system supporting different types of template engines.
|
- [x] Create a view system 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).
|
- [x] Extend, test and publish to the public the [Iris' cmd](https://github.com/kataras/iris/tree/master/iris).
|
||||||
|
- [ ] Complete the front-end API tests [inside the iris-contrib]
|
||||||
If you're willing to donate click [here](DONATIONS.md)!
|
If you're willing to donate click [here](DONATIONS.md)!
|
||||||
|
|
||||||
People
|
People
|
||||||
|
|
Loading…
Reference in New Issue
Block a user