1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-07 20:17:05 +00:00

Add example of the powerful 'templ' generated templates

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-12-13 02:18:16 +02:00
parent 7ffe4010b9
commit 9279ca5a27
9 changed files with 359 additions and 8 deletions

View File

@@ -0,0 +1,18 @@
package main
import (
"github.com/kataras/iris/v12"
)
// 1.
// $ go install github.com/a-h/templ/cmd/templ@latest
// $ templ generate
// $ go run .
func main() {
component := hello("Makis")
app := iris.New()
app.Get("/", iris.Component(component))
app.Listen(":8080")
}