package main import ( "git.matterlinux.xyz/Matterlinux/website/routes" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/log" "github.com/gofiber/template/html/v2" ) func main(){ engine := html.New("./templates", ".html") app := fiber.New(fiber.Config{ Views: engine, }) app.Static("/", "./public") app.Static("/images", "./content/images") app.Get("/", routes.IndexRoute) app.Get("/news", routes.NewsRoute) app.Get("/news/:id", routes.PostRoute) app.Get("*", func(c *fiber.Ctx) error { return routes.RenderError(c, 404) }) log.Fatal(app.Listen(":9878")) }