Added a lot of different things

This commit is contained in:
Simon Martens
2024-12-02 19:32:25 +01:00
parent 3dbbe6629c
commit 51afda5ff2
17 changed files with 92 additions and 156 deletions

18
server/statics.go Normal file
View File

@@ -0,0 +1,18 @@
package server
import (
"io/fs"
"net/http"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)
func static(fs *fs.FS) fiber.Handler {
return filesystem.New(filesystem.Config{
Root: http.FS(*fs),
Browse: false,
Index: "index.html",
MaxAge: 3600,
})
}