Open tschaffter opened 2 years ago
This statement is shedding some light on the issue reported:
We will likely remove the getRouter function in a future Probot version altogether as it cannot be supported in serverless environments. We will instead ask people to use the Server export instead and define their custom routes that way.
I'm trying to add HTTP routes to a Probot app deployed to AWS Lambda with your adapter. The HTTP route
/api/hello-world
added works when deploying the app locally withnodemon src/index.ts
. However, the endpoint returns the error 500 when deployed to AWS Lambda with Serverless becausegetRouter
is undefined.Is this behavior to be expected when using this adatper and deploying on AWS lambda? Probot doc mentions that
getRouter
will be set only when running the app withprobot run
or using theirServer
.src/index.ts
: