Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 ?

like image 302
MostafaMV Avatar asked Mar 10 '15 04:03

MostafaMV


2 Answers

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

like image 55
Rurri Avatar answered Sep 25 '22 15:09

Rurri


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);
like image 37
redcap3000 Avatar answered Sep 21 '22 15:09

redcap3000