Serverless Examples – A collection of boilerplates and examples of serverless architectures built with the Serverless Framework on AWS Lambda, Microsoft Azure, Google Cloud Functions, and more.
handler.js uses client.isConnected(); this results in runtime error
I upgraded to current "mongodb" npm 6.8.0
According to research client.connect() is a no-op if already connected, so I just removed the client.isConnected() condition.
Also the MongoDB Atlas URL seems to be wrong today - at least it doesn't match mine. I just replaced it.
Last but not least, serverless.yml sets nodejs14x runtime, which is no longer supported.
handler.js uses client.isConnected(); this results in runtime error I upgraded to current "mongodb" npm 6.8.0 According to research client.connect() is a no-op if already connected, so I just removed the client.isConnected() condition.
Also the MongoDB Atlas URL seems to be wrong today - at least it doesn't match mine. I just replaced it.
Last but not least, serverless.yml sets nodejs14x runtime, which is no longer supported.
I'm going to provide a PR with these minor fixes.