first commit
This commit is contained in:
23
main.go
Normal file
23
main.go
Normal file
@ -0,0 +1,23 @@
|
||||
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"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user