vapor-community / vapor-aws-lambda-runtime

Run your Vapor api server on AWS Lambda using the official Swift Server runtime.
Apache License 2.0
103 stars 10 forks source link

Local Lambda Debugging #9

Open fcobia opened 3 years ago

fcobia commented 3 years ago

The swift-was-lambda-runtime project has added the ability to run a local lambda server by setting the LOCAL_LAMBDA_SERVER_ENABLED environment variable to "true." I tried this with the Vapor integration and it does not seem to work.

It would be nice if this worked so I could run / debug inside Xcode on my Mac.

If you do not have time to do it, I have looked a little and am not sure where to look. Do you know where I would start to look into fixing this?

fabianfett commented 3 years ago

Hi @fcobia, thanks for bringing this up. I can totally see the value of this and I'm thinking about how to achieve it.

The library uses an extension hook from swift-aws-lambda-runtime that is located below the level where the LOCAL_LAMBDA_SERVER_ENABLED environment variable is implemented, so we will need to reinvent the wheel for vapor-aws-lambda-runtime. I'm not sure what the best approach is for this yet.