Created
November 19, 2021 07:04
-
-
Save shrmpy/ab950a1ee78235c2bf28146434f208e9 to your computer and use it in GitHub Desktop.
refactor init and lambda.Start with the addition of middleware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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