mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
README: add 'run in the browser' button
after the quick start details, so it is visible always Former-commit-id: 0c13135a01c2b883aa4a9629a507aaf622d22ade
This commit is contained in:
27
README.md
27
README.md
@@ -10,7 +10,7 @@
|
||||
|
||||
# Iris Web Framework <a href="README_GR.md"><img width="20px" src="https://iris-go.com/images/flag-greece.svg" /></a> <a href="README_FR.md"><img width="20px" src="https://iris-go.com/images/flag-france.svg" /></a> <a href="README_ZH.md"><img width="20px" src="https://iris-go.com/images/flag-china.svg" /></a> <a href="README_ES.md"><img width="20px" src="https://iris-go.com/images/flag-spain.png" /></a> <a href="README_FA.md"><img width="20px" src="https://iris-go.com/images/flag-iran.svg" /></a> <a href="README_RU.md"><img width="20px" src="https://iris-go.com/images/flag-russia.svg" /></a> <a href="README_KO.md"><img width="20px" src="https://iris-go.com/images/flag-south-korea.svg?v=12" /></a>
|
||||
|
||||
[](https://travis-ci.org/kataras/iris) [](https://github.com/kataras/iris/tree/master/_examples) [](https://gitter.im/iris_go/community) <!--[](https://app.fossa.io/projects/git%2Bgithub.com%2Fkataras%2Firis?ref=badge_shield)--> [](https://www.paypal.me/kataras) <!--[](https://goreportcard.com/report/github.com/kataras/iris)--><!--[](https://pkg.go.dev/github.com/kataras/iris/v12@v12.2.0)--> <!--[](https://www.paypal.me/kataras)--><!-- [](https://github.com/kataras/iris/releases) -->
|
||||
[](https://travis-ci.org/kataras/iris) [](https://github.com/kataras/iris/tree/master/_examples) [](https://gitter.im/iris_go/community) <!--[](https://app.fossa.io/projects/git%2Bgithub.com%2Fkataras%2Firis?ref=badge_shield)--> [](https://iris-go.com/donate) <!--[](https://goreportcard.com/report/github.com/kataras/iris)--><!--[](https://pkg.go.dev/github.com/kataras/iris/v12@v12.2.0)--> <!-- [](https://github.com/kataras/iris/releases) -->
|
||||
|
||||
<a href="https://iris-go.com"> <img align="right" src="https://iris-go.com/images/logo-w169.png"></a>
|
||||
|
||||
@@ -32,8 +32,8 @@ Learn what [others saying about Iris](https://iris-go.com/testimonials/) and **[
|
||||
```sh
|
||||
# https://github.com/kataras/iris/wiki/Installation
|
||||
$ go get github.com/kataras/iris/v12@master
|
||||
# assume the following code in example.go file
|
||||
$ cat example.go
|
||||
# assume the following code in main.go file
|
||||
$ cat main.go
|
||||
```
|
||||
|
||||
```go
|
||||
@@ -42,27 +42,24 @@ package main
|
||||
import "github.com/kataras/iris/v12"
|
||||
|
||||
func main() {
|
||||
app := iris.New()
|
||||
app.Get("/ping", func(ctx iris.Context) {
|
||||
ctx.JSON(iris.Map{
|
||||
"message": "pong",
|
||||
})
|
||||
})
|
||||
app := iris.New()
|
||||
app.Get("/", index)
|
||||
app.Listen(":8080")
|
||||
}
|
||||
|
||||
app.Listen(":8080")
|
||||
func index(ctx iris.Context) {
|
||||
ctx.HTML("<h1>Hello, World!</h1>")
|
||||
}
|
||||
```
|
||||
|
||||
```sh
|
||||
# run example.go and
|
||||
# visit http://localhost:8080/ping on browser
|
||||
$ go run example.go
|
||||
$ go run main.go
|
||||
```
|
||||
|
||||
> Routing is powered by [muxie](https://github.com/kataras/muxie), the most powerful and fastest trie-based software written in Go.
|
||||
|
||||
</details>
|
||||
|
||||
[](https://repl.it/@kataras/Iris-Hello-World)
|
||||
|
||||
Iris contains extensive and thorough **[wiki](https://github.com/kataras/iris/wiki)** making it easy to get started with the framework.
|
||||
|
||||
<!--  -->
|
||||
|
||||
Reference in New Issue
Block a user