1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 11:57:02 +00:00

add viper configuration example and minor improvements - read HISTORY.md

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-09-16 12:59:51 +03:00
parent f9e048e56b
commit 373b8993ad
20 changed files with 222 additions and 53 deletions

View File

@@ -0,0 +1,19 @@
package main
import (
"fmt"
"app/config"
"github.com/kataras/iris/v12"
)
func main() {
app := iris.New()
app.Get("/", func(ctx iris.Context) {
ctx.TextYAML(config.C)
})
addr := fmt.Sprintf("%s:%d", config.C.Addr.Internal.IP, config.C.Addr.Internal.Plain)
app.Listen(addr, iris.WithConfiguration(config.C.Iris))
}