serverless / serverless/examples
aws-node-mongodb-atlas code outdated
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.5k
- Forks
- 4.4k
- Avg merge
- 2h 55m
- Merged PRs (30d)
- 3
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with handler.js and serverless.yml, checking the mongodb 6.8.0 connection behavior, the MongoDB Atlas URL, and the configured Node.js runtime. Update the outdated settings and verify that the example no longer calls the removed connection method, uses a current Atlas URL, and targets a supported runtime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, mongodb, node.js
- Domain
- backend, cloud, database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100