https://github.com/ponomarevlad/mongo-realm-web-wrapper
https://github.com/ponomarevlad/mongo-realm-web-wrapper
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ponomarevlad/mongo-realm-web-wrapper
- Owner: PonomareVlad
- Created: 2023-11-06T01:38:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-01T16:44:10.000Z (6 months ago)
- Last Synced: 2025-03-27T22:51:12.434Z (2 months ago)
- Language: JavaScript
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mongo-realm-web-wrapper
```js
import { MongoClient } from 'mongo-realm-web-wrapper'const client = new MongoClient({ id, key, serviceName })
async function run() {
try {
const database = client.db('sample_mflix')
const movies = database.collection('movies')// Query for a movie that has the title 'Back to the Future'
const query = { title: 'Back to the Future' }
const movie = await movies.findOne(query)console.log(movie)
} finally {
// Ensures that the client will close when you finish/error
await client.close()
}
}run().catch(console.dir)
```