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 a lambda handler for demo-app-posts #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jagthedrummer
Copy link
Contributor

This adds a lambda handler that wraps demo-app-posts.js. This ALSO refactors demo-app-posts.js to follow the Express.js conventions for how to use req and res. A result of the refactor is that demo-app.js is broken. The issue there is that server.js is exposing the Pretender convention for returning an array of values, instead of relying on a call to res.json in order to respond like in Express.

I tried to get server.js working, but I'm not sure that Pretender exposes an api that's friendly to async resolution. I tried the 'manual' resolution method but even that still requires the original handler to return the actual response data and doesn't allow it to be set at the time of resolution (pretender.resolve(req)).

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.

1 participant