Skip to content

Instantly share code, notes, and snippets.

@whtswrng
Last active November 8, 2018 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whtswrng/78a3b515ce837cab679aa64dbb29d259 to your computer and use it in GitHub Desktop.
Save whtswrng/78a3b515ce837cab679aa64dbb29d259 to your computer and use it in GitHub Desktop.
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