This repository has been archived on 2024-07-05. You can view files and clone it, but cannot push or open issues or pull requests.
PrivacyHex/app.go

26 lines
427 B
Go
Raw Normal View History

2023-10-12 16:56:52 +03:00
package main
2023-10-13 13:44:47 +03:00
import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)
2023-10-12 16:56:52 +03:00
func main() {
2023-10-13 13:44:47 +03:00
app := fiber.New(fiber.Config{
Views: setupTemplates(),
})
app.Static("/public", "./public")
2023-10-12 16:56:52 +03:00
app.Get("/", func(ctx *fiber.Ctx) error {
2023-10-13 13:44:47 +03:00
return ctx.Render("index", fiber.Map{})
2023-10-12 16:56:52 +03:00
})
app.Listen("localhost:4200")
}
2023-10-13 13:44:47 +03:00
func setupTemplates() *html.Engine {
engine := html.New("./views", ".html")
return engine
}