-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
add staticFS
Checklist
- [x ] Dependencies installed
- [x ] No typos
- Searched existing issues and docs
Expected behaviour
Actual behaviour
Steps to reproduce
Working code to debug
package main
import (
"embed"
"net/http"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)
//go:embed static
var static embed.FS
func main() {
engine := echo.New()
engine.Static("/static", "static")
// use embed
engine.StaticFS("/staticfs",http.FS(static))
// or
engine.StaticFS("/staticfs",static)
engine.Start("8080")
}