javascript - nodejs - Convert a connect request/response object to a Express request/response object -
preface:
this going bit of weird question, , know going hacky solution main concern solve interest of saving time.
first off, know connect
, express
create own response
, request
object types, , differ lot cannot used interchangeably (e.g. express
middleware plugin used on connect
-based framework, vv). if necessity arises?
my question:
how convert connect
response
or request
object within connect
middleware call express
or express
-compatible res
/req
object can use pass express
-based middleware plugin?
edit:
as @jfriend00 pointed out, yes there middleware fix out of scope of above question.
i'll add following rationale quoted comment below:
i thinking somewhere down line, connect have saved original properties of original node request/response object leading question
surely if original object saved, there potentially conversion possible express request/response object..
Comments
Post a Comment