1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-22 14:13:29 +00:00

📘 add pkger example

This commit is contained in:
Fenny 2020-09-16 15:38:11 +02:00
parent ebe107d54f
commit d0c541ee2b

View File

@ -38,6 +38,29 @@ app.Use(filesystem.New(filesystem.Config{
}))
```
## pkger
https://github.com/markbates/pkger
```go
package main
import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
"github.com/markbates/pkger"
)
func main() {
app := fiber.New()
app.Use("/assets", filesystem.New(filesystem.Config{
Root: pkger.Dir("/assets"),
})
log.Fatal(app.Listen(":3000"))
}
```
## packr
https://github.com/gobuffalo/packr