Nopik / serverless-serve

Local lambda HTTP serve plugin for Serverless framework, a.k.a. API Gateway simulator.
119 stars 19 forks source link

Changing functionality for serverless v0.1.0 #12

Closed benscholler closed 8 years ago

benscholler commented 8 years ago

This updates the plugin for the new properties and state found in Serverless v0.1.0.

austencollins commented 8 years ago

:+1: I haven't tried running this, but it looks pretty good :)

iblue commented 8 years ago

I gave it a quick try on 0.1.2. It works. But you should probably also update the readme. See https://github.com/Nopik/serverless-serve/issues/11#issuecomment-173135928

benscholler commented 8 years ago

@Nopik Any chance you can review this?

benscholler commented 8 years ago

@ac360 One thing I noticed with this plugin is that it doesn't take into consideration the requestTemplates configuration for functions, which can lead to strange development patterns when using this plugin. I don't know if @Nopik (or anyone else) is interested in trying to create that functionality, but it would be very helpful to mimic the AWS environment as close as possible and that would help a lot.

In doing so, I think the following function should be moved: https://github.com/serverless/serverless/blob/master/lib/actions/EndpointBuildApiGateway.js#L515 Preferably into a util library for parsing configuration or as part of the ServerlessEndpoint class. Thoughts?

Sorry for the tangent, but it's relevant specifically to this plugin. :)

benscholler commented 8 years ago

@ac360 & @Nopik With how quickly serverless is moving, I'd like to have this merged soon.