Skip to content

Instantly share code, notes, and snippets.

@mxro

mxro/main.go

Created Apr 17, 2021
Embed
What would you like to do?
Entry point for Go Lambda
package main
import (
"os"
"github.com/aws/aws-lambda-go/lambda"
)
func main() {
// when no 'PORT' environment variable defined, process lambda
if os.Getenv("PORT") == "" {
lambda.Start(Handler)
return
}
// otherwise start a local server
StartLocal()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment