mirror of
https://github.com/kataras/iris.git
synced 2025-03-14 08:16:28 +01:00
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:
parent
fd6e49c57e
commit
4013577c53
|
@ -7,6 +7,7 @@ It doesn't contains "best ways" neither explains all its features. It's just a s
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
|
||||||
* [Level: Beginner](beginner)
|
* [Level: Beginner](beginner)
|
||||||
|
* [Hello world](beginner/hello-world/main.go)
|
||||||
* [Overview](beginner/overview/main.go)
|
* [Overview](beginner/overview/main.go)
|
||||||
* [Listening](beginner/listening)
|
* [Listening](beginner/listening)
|
||||||
* [Common, with address](beginner/listening/listen-addr/main.go)
|
* [Common, with address](beginner/listening/listen-addr/main.go)
|
||||||
|
|
14
_examples/beginner/hello-world/main.go
Normal file
14
_examples/beginner/hello-world/main.go
Normal 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"))
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user