add a hello-world example as we had before, we have overview too but it's a little larger and newcomers may afraid 👍

Former-commit-id: 459d70bb690844176177050e37c24e28587f343b
This commit is contained in:
kataras 2017-06-05 01:01:58 +03:00
parent fd6e49c57e
commit 4013577c53
2 changed files with 15 additions and 0 deletions

View File

@ -7,6 +7,7 @@ It doesn't contains "best ways" neither explains all its features. It's just a s
## Table of contents
* [Level: Beginner](beginner)
* [Hello world](beginner/hello-world/main.go)
* [Overview](beginner/overview/main.go)
* [Listening](beginner/listening)
* [Common, with address](beginner/listening/listen-addr/main.go)

View File

@ -0,0 +1,14 @@
package main
import (
"github.com/kataras/iris"
"github.com/kataras/iris/context"
)
func main() {
app := iris.New()
app.Handle("GET", "/", func(ctx context.Context) {
ctx.HTML("<b> Hello world! </b>")
})
app.Run(iris.Addr(":8080"))
}