We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm trying to get apex/gateway to work, however the provided example doesn't really work:
apex/gateway
apex ᐅ export GO111MODULE=on apex ᐅ cat main.go package main import ( "fmt" "log" "net/http" "github.com/apex/gateway" "github.com/aws/aws-lambda-go" ) func main() { http.HandleFunc("/", hello) log.Fatal(gateway.ListenAndServe(":3000", nil)) } func hello(w http.ResponseWriter, r *http.Request) { // example retrieving values from the api gateway proxy request context. requestContext, ok := gateway.RequestContext(r.Context()) if !ok || requestContext.Authorizer["sub"] == nil { fmt.Fprint(w, "Hello World from Go") return } userID := requestContext.Authorizer["sub"].(string) fmt.Fprintf(w, "Hello %s from Go", userID) } apex ᐅ go build main.go go: finding github.com/aws/aws-lambda-go/events latest go: finding github.com/aws/aws-lambda-go/lambda latest build command-line-arguments: cannot load github.com/aws/aws-lambda-go: cannot find module providing package github.com/aws/aws-lambda-go
Any ideas? Thanks in advance.
BR, Victor
The text was updated successfully, but these errors were encountered:
Hey @dorneanu
take a look at #25 :)
Sorry, something went wrong.
No branches or pull requests
Hi,
I'm trying to get
apex/gateway
to work, however the provided example doesn't really work:Any ideas? Thanks in advance.
BR,
Victor
The text was updated successfully, but these errors were encountered: