I am building a project outside the Meteor ecosystem but would like to use Minimongo for it. Just for storing and retrieving data on the client side. I found an NPM package which had been forked from the Meteor version of Minimongo in 2014, but this one is very limited. It doesn’t even support queries in remove(). Is anyone aware of a better alternative on NPM that mimics at least basic MongoDB behavior in the browser?
Have you been acquainted with this package? https://github.com/petehunt/minimongo-cache
Thanks, didn’t know it. Yet, it has the same limited API query-wise.
It’s been a year or so since I’ve played around with that library. I remember it being enough for my needs, but I had to change my query style a little bit, for sure, nothing too drastic. One of the main downsides was that reactivity was not implemented very well, and version numbers were a bit weird.
Some of the more minor complaints which aren’t a huge deal:
You might need to use
upsert instead of
insert, and you might need to use
remove with a single string argument instead of a selector. IIRC, the fields/projection and sort might have a slightly different API. Most of the time, you should have an
_id handle handy, if not, it’s pretty easy to keep those around in your returned documents.
It’s a great package, but the API is non-standard. You will probably be able to get what you need done, but you’ll have to tinker a bit with the syntax.
You could take a look at rxdb https://github.com/pubkey/rxdb
Seems to be the nice magic vodoo meteor was loved for.
Haven’t tried it myself but seems pretty promising.
In fact, that’s pretty cool! Thanks for pointing me at it.