Updates
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
|||||||
"github.com/gofiber/fiber/v2/middleware/adaptor"
|
"github.com/gofiber/fiber/v2/middleware/adaptor"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// example taken from https://github.com/a-h/templ/tree/main/examples/integration-gofiber
|
||||||
func Render(c *fiber.Ctx, component templ.Component, options ...func(*templ.ComponentHandler)) error {
|
func Render(c *fiber.Ctx, component templ.Component, options ...func(*templ.ComponentHandler)) error {
|
||||||
componentHandler := templ.Handler(component)
|
componentHandler := templ.Handler(component)
|
||||||
for _, o := range options {
|
for _, o := range options {
|
||||||
|
|||||||
@ -17,7 +17,10 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func initApp() *fiber.App {
|
func initApp() *fiber.App {
|
||||||
app := fiber.New()
|
app := fiber.New(fiber.Config{
|
||||||
|
CaseSensitive: true,
|
||||||
|
StrictRouting: true,
|
||||||
|
})
|
||||||
return app
|
return app
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user