Open algoflows opened 7 months ago
Yep! Sure does.
import (
"net/http"
"github.com/labstack/echo/v4"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
"github.com/awslabs/aws-lambda-go-api-proxy/echo"
)
var (
echoLambda *echoadapter.EchoLambdaV2
)
func init() {
e := echo.New()
e.GET("test", func(c echo.Context) error {
return c.String(http.StatusOK, "hello world")
})
echoLambda = echoadapter.NewV2(e)
}
func Handler(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error) {
return echoLambda.ProxyWithContext(ctx, req)
}
func main() {
lambda.Start(Handler)
}
Does this support Echo framework?
https://echo.labstack.com/