2017-11-07 00:40:56 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2019-10-25 00:27:02 +02:00
|
|
|
"github.com/kataras/iris/v12"
|
2017-11-07 00:40:56 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
app := iris.New()
|
|
|
|
app.Get("/", func(ctx iris.Context) {
|
|
|
|
ctx.HTML("<b>Hello!</b>")
|
|
|
|
})
|
|
|
|
// [...]
|
|
|
|
|
|
|
|
// Good when you share configuration between multiple iris instances.
|
|
|
|
// This configuration file lives in your $HOME/iris.yml for unix hosts
|
|
|
|
// or %HOMEDRIVE%+%HOMEPATH%/iris.yml for windows hosts, and you can modify it.
|
2020-03-05 21:41:27 +01:00
|
|
|
app.Listen(":8080", iris.WithGlobalConfiguration)
|
2017-11-07 00:40:56 +01:00
|
|
|
// or before run:
|
|
|
|
// app.Configure(iris.WithGlobalConfiguration)
|
2020-03-05 21:41:27 +01:00
|
|
|
// app.Listen(":8080")
|
2017-11-07 00:40:56 +01:00
|
|
|
}
|