iris/_examples/view/template_amber_0/main.go
Gerasimos (Makis) Maropoulos e1f25eb098
Full support of the http.FileSystem on all view engines as requested at #1575
Also, the HandleDir accepts both string and http.FileSystem (interface{}) (like the view's fs)
2020-09-05 08:34:09 +03:00

21 lines
362 B
Go

package main
import "github.com/kataras/iris/v12"
func main() {
app := iris.New()
// Read about its markup syntax at: https://github.com/eknkc/amber
tmpl := iris.Amber("./views", ".amber")
app.RegisterView(tmpl)
app.Get("/", func(ctx iris.Context) {
ctx.View("index.amber", iris.Map{
"Title": "Title of The Page",
})
})
app.Listen(":8080")
}