Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
refactor init and lambda.Start with the addition of middleware
var conf *ebs.Config
func init() {
conf = ebs.NewConfig()
secret := os.Getenv("EXTENSION_SECRET")
helper = newService(decodeSecret(secret))
}
func main() {
lambda.Start(
ebs.MiddlewareCORS(conf,
handler,
),
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment