serverless-http icon indicating copy to clipboard operation
serverless-http copied to clipboard

Broken with Restify?

Open daniel-ac-martin opened this issue 4 years ago • 2 comments

I had problems running this library with the current version of Restify. I received the 'unsupported framework' error.

I seem to have been able to get it to work with the following hack:

httpd.handler = httpd._onRequest;
handler = serverless(httpd);

I wonder whether _onRequest should be checked for in getFramework?

(Another candidate might be _runRoute.)

daniel-ac-martin avatar Apr 30 '20 17:04 daniel-ac-martin

That makes sense, yeah, the framework detection is pretty hacky and in some cases leans more on internal details (subject to change - like this seems to be)

dougmoscrop avatar Apr 30 '20 18:04 dougmoscrop

@dougmoscrop: Thanks for reviewing that PR.

Would you mind publishing when you get a chance? - That way, I can remove that workaround from my code.

daniel-ac-martin avatar May 01 '20 16:05 daniel-ac-martin