diff options
| author | 2025-07-26 22:01:30 +0700 | |
|---|---|---|
| committer | 2025-07-26 22:01:30 +0700 | |
| commit | 97e30570056309bda28fc41acba27c01fa1ef9f3 (patch) | |
| tree | d6102a1756c9fb57bf5b61283d0163b29e3a8881 /main.go | |
| parent | 452a99641208db2695f3c1d0419c3a547cabca70 (diff) | |
| download | web-97e30570056309bda28fc41acba27c01fa1ef9f3.tar.gz web-97e30570056309bda28fc41acba27c01fa1ef9f3.zip | |
refactor: use tailwindcss tool for generating css (vpn required no more for russia)
refactor: move css to sayana-static bucket
refactor: first touch of rendering templates
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -4,10 +4,21 @@ import ( "log" "github.com/gofiber/fiber/v2" + "github.com/gofiber/template/html/v2" ) func main() { - app := fiber.New() + engine := html.New("./views", ".html") + + app := fiber.New(fiber.Config{ + Views: engine, + }) + + app.Get("/", func(c *fiber.Ctx) error { + return c.Render("index", fiber.Map{ + "Title": "Демо-материал после демон-аэропорта", + }) + }) app.Static("/", "./public") |