mirror of
https://github.com/kataras/iris.git
synced 2026-01-04 18:57:03 +00: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:
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"))
|
||||
}
|
||||
Reference in New Issue
Block a user