Skip to content

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