Can I use Minimongo without using the entire Meteor or Blaze framework?
Asked Answered
G

2

7

I am dealing with large json files on the client side. I want to be able to query the json in the same way I query mongo collections on the server side. I recently heard about minimongo which is exactly what I want. By the way, my backend is Flask and I'm using angular at the front-end. Can I use Minimongo as a simple javascript library without using the entire Meteor/Blaze framework ?

Galla answered 10/3, 2015 at 4:42 Comment(1)
There is a fork on npm here: npmjs.com/package/minimongoMarkley
B
1

Unfortunately, you cannot just grab the minimongo directly from the meteor packages and have it work in the browser. There are a couple ways though.

There is a fork at https://www.npmjs.com/package/minimongo

This was forked back in Jan 2014.

If you need/want the latest from meteor, I also have a version that grabs in the latest minimongo, and builds/tests/browserifies using grunt scripts.

You can grab that from here: https://github.com/rurri/minimongo-standalone

Boyish answered 11/9, 2015 at 19:39 Comment(0)
T
1

I was able to get this working recently and was thrilled (by doing the well documented removing the meteor-base package, adding them all back individually, and then removing the mongo package).

The thing is theres no documentation on how to create the collection without using the new Mongo.Collection(null) syntax; so getting around that took a bit of peeking around in this file.

   

// New mongo-less syntax.

Faucets = new LocalCollection();

// Old Syntax

Faucets = new Mongo.Collection(null);
Tarton answered 10/4, 2016 at 2:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.