Added news sorting and image support

This commit is contained in:
ngn
2023-12-23 00:22:23 +03:00
parent 6b503d8555
commit 6477240dd4
4 changed files with 34 additions and 6 deletions

View File

@ -13,11 +13,14 @@ func main(){
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"))
}