0.1.0 • Published 8 months ago

mongo-rpc v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

mongo-rpc: MongoDB RPC Client for Edge Proxy, Caching, and Connection Pooling

import { MongoRemoteClient } from 'mongo-rpc'

const client = MongoRemoteClient({ cluster: 'demo', apiKey: 'testing123' })

const findResults = await client.db('test').collection('test').find({}).sort({_id: -1}).limit(100).toArray()
const insertResults = await client.db('test2').collection('test2').insertOne({ test: 123 })

console.log({ findResults, insertResults })