render templated homepage
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
package public
|
||||
|
||||
import "github.com/gofiber/fiber/v2"
|
||||
import (
|
||||
"github.com/Henelik/cms/web/public/views"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func RegisterRoutes(app *fiber.App) {
|
||||
app.Get("/", func(ctx *fiber.Ctx) error {
|
||||
return ctx.Send([]byte("It's working! It's working!"))
|
||||
ctx.Set("Content-Type", "text/html")
|
||||
|
||||
return views.HomePage().Render(ctx.Context(), ctx)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user