website/main.go
2023-12-09 19:25:38 +03:00

24 lines
476 B
Go

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.Get("/", routes.IndexRoute)
app.Get("/news", routes.NewsRoute)
app.Get("/news/:id", routes.PostRoute)
log.Fatal(app.Listen(":9878"))
}