echolam
echolam is a library that bind AWS Lambda, AWS API Gateway to Echo
framework
Install
go get -u github.com/aws-serverless-go/echolam
Example
package main
import (
"github.com/aws-serverless-go/echolam"
"github.com/labstack/echo/v4"
"net/http"
)
func main() {
e := echo.New()
e.GET("/", func(c echo.Context) error {
return c.String(http.StatusOK, "Hello, World!")
})
if echolam.IsLambdaRuntime() {
echolam.StartLambdaWithAPIGateway(e)
} else {
e.Logger.Fatal(e.Start(":1323"))
}
}
License
MIT License