mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
e1f25eb098
Also, the HandleDir accepts both string and http.FileSystem (interface{}) (like the view's fs)
21 lines
362 B
Go
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")
|
|
}
|