mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
0d26f24eb7
Former-commit-id: d20afb2e899aee658a8e0ed1693357798df93462
22 lines
475 B
Go
22 lines
475 B
Go
package main
|
|
|
|
import (
|
|
"github.com/kataras/iris/v12"
|
|
)
|
|
|
|
func main() {
|
|
app := iris.New()
|
|
|
|
app.Get("/", func(ctx iris.Context) {
|
|
ctx.HTML("<b>Hello!</b>")
|
|
})
|
|
// [...]
|
|
|
|
// Good when you have two configurations, one for development and a different one for production use.
|
|
app.Listen(":8080", iris.WithConfiguration(iris.TOML("./configs/iris.tml")))
|
|
|
|
// or before run:
|
|
// app.Configure(iris.WithConfiguration(iris.TOML("./configs/iris.tml")))
|
|
// app.Listen(":8080")
|
|
}
|