Simple client for mongodb
$ npm install mongozavr
const Mongo = require("mongozavr");
const mongo = new Mongo({url: "mongodb://127.0.0.1:27017", db: "someDbName"});
const _id = Mongo.getRandomId();
await mongo.insert('someCollectionName', {_id, "foo": "bar"});
await mongo.find('someCollectionName', {}, {"limit":10, "skip":10, "sort":{"_id":-1}});
const Mongo = require("mongozavr");
const mongo = new Mongo({url: "mongodb://127.0.0.1:27017", db: "someDbName", collections: "someCollectionName"});
const _id = Mongo.getRandomId();
await mongo.insert({_id, "foo": "bar"});
await mongo.find({}, {"limit":10, "skip":10, "sort":{"_id":-1}});
const Mongo = require("mongozavr");
await mongo.find('someCollectionName', {_id, "5e318aa8473d790943408095"});
await mongo.update('someCollectionName', {_id, "5e318aa8473d790943408095"}, {"foo": "bar"});
const Mongo = require("mongozavr");
await mongo.updateOne('someCollectionName', {_id, "5e318aa8473d790943408095"}, {$set:{"foo": "bar"}, $push: {"someArrayField":"some item"}});