-
Hi! i have a library which provides me with Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
There is Lines 888 to 894 in 82a964c Here is example with it: https://echo.labstack.com/cookbook/embed-resources/ |
Beta Was this translation helpful? Give feedback.
-
@aldas Hi! I tried using This is the function that returns the handlers My server code: func main() {
e := echo.New()
// auth initalization stuff here
authRoutes, avaRoutes := authService.Handlers()
// Middlewares
e.Use(middleware.Recover())
e.Use(middleware.CORS())
e.Use(middleware.Secure())
// Routes
e.GET("/auth", echo.WrapHandler(authRoutes))
e.GET("/avatar", echo.WrapHandler(avaRoutes))
// Start server
if err := e.Start(":8080"); err != http.ErrServerClosed {
log.Fatal(err)
}
} |
Beta Was this translation helpful? Give feedback.
There is
echo.WrapHandler
that you can use to wraphttp.Handler
into handlerecho/echo.go
Lines 888 to 894 in 82a964c
Here is example with it: https://echo.labstack.com/cookbook/embed-resources/