Instantly share code, notes, and snippets.

@whtswrng /.js
Last active Nov 8, 2018

Embed
What would you like to do?
function requestAdapter(expressRequest) {
return request;
}
function responseAdapter(expressResponse) {
return {
send: (statusCode, data, headers) => {
expressResponse.status(statusCode);
if (headers) {
expressResponse.set(headers);
}
expressResponse.send(data);
},
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment