unstorage
unstorage copied to clipboard
Support MongoDB on Edge Runtime
Describe the feature
Currently MongoDB support is provided by the NodeJS driver and is not supported on edge runtimes. I would propose adding additional support for MongoDB through either the Atlas Data API and/or Realm Web SDK which will run on edge runtimes like Cloudflare Workers and the Vercel Edge Runtime.
If this is an acceptable proposal, I would be willing to contribute a PR. Thanks.
Additional information
- [X] Would you be willing to help implement this feature?
Hi. Sure a new driver for mongodbAtlasData
would be nice 👍🏼 (found docs here https://www.mongodb.com/docs/atlas/api/data-api/)
There's 3 ways we can implement :
- Data API
- Web SDK https://www.mongodb.com/docs/realm/web/mongodb/#create-documents
- GraphQL API : https://www.mongodb.com/docs/atlas/app-services/graphql/
For reference, difference between Realm and atlas https://www.mongodb.com/community/forums/t/frequently-asked-questions-atlas-app-services-realm/167589
Since for KV usage, we need simple operations, i prefer to use Data API with native fetch if possible :)