Skip to content
New issue

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

Add support for ANY method #93

Closed
wants to merge 2 commits into from

Conversation

nrako
Copy link

@nrako nrako commented Jan 29, 2017

functions:
  foo:
    handler: handler.foo
    events:
      - http:
          path: '/foo'
          method: any

ANY Method – Instead of specifying individual behaviors for each HTTP method (GET, POST, PUT, and so forth) you can now use the catch-all ANY method to define the same integration behavior for all requests.

source: https://aws.amazon.com/blogs/aws/api-gateway-update-new-features-simplify-api-development/

Supplement #80 with covering test.
And...⚠️ second commit also prevent OPTIONS handlers to always be created, but instead only create handler when cors: true is set. From my test this would be more close to AWS, even if express has some default automatic OPTIONS handlers (see expressjs/express#2246). [needs-discussion]?

@HyperBrain
Copy link
Member

@nrako It would be great if you could comment in #135 if you use the serve functionality or not, so that we can decide how to proceed there.

@nrako
Copy link
Author

nrako commented Jul 4, 2017

@HyperBrain I haven't circled around serverless-webpack much lately. Looks like serverless-offline could be the way to go, but I can't really give a well-thought opinion on the serve functionality. In any case feel free to close the PR if necessary.

@HyperBrain
Copy link
Member

@nrako Thanks for coming back. A lot of other people in the community work with serverless-offline together with serverless-webpack and it shows out that the offline plugin (which is centrally built around offline emulation) does the job pretty well and better than serve.
We will concentrate on the packaging and let the emulation stuff for plugins which are solely made for that 😄 .

@HyperBrain
Copy link
Member

serve will be removed in the next v3.0.0 release in favor of serverless-offline (see #152 ). No efforts will be spent on the function anymore. So I'll close this issue.

@HyperBrain HyperBrain closed this Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants