Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I view the contents of the Minimongo database in the client with Meteor?

I know I can query CollectionName.find().fetch() in the browser's JS console. Are there other tools that are the equivalent of a GUI admin tool for all the browser's local minimongo storage ?

like image 947
Dean Radcliffe Avatar asked Sep 16 '14 15:09

Dean Radcliffe


People also ask

What is Meteor DataBase?

The Visual Meteor DataBase (VMDB) The VMDB contains about 3,000,000 meteors obtained by standardized observing methods which were collected during the last ~25 years.

What is Meteor MongoDB?

Meteor provides a complete open source platform for building web and mobile apps in pure JavaScript. The Meteor team chose MongoDB as its datastore for its performance, scalability, and rich features for JSON. Meteor apps run using JavaScript via Node. JS on the server and JavaScript in the phone's browser.

What is Meteor collection?

Collections are Meteor's way of storing persistent data. The special thing about collections in Meteor is that they can be accessed from both the server and the client, making it easy to write view logic without having to write a lot of server code.


7 Answers

You can either use a server-side privileged admin solutions like Houston or any other MongoDB admin interface.

If you want to query data on the client for a quick inspection, you can use console.table:

console.table(Tasks.find().fetch())
like image 79
imslavko Avatar answered Oct 27 '22 08:10

imslavko


Mongol does this, FTW, thanks to Max Savin.

like image 35
Dean Radcliffe Avatar answered Oct 27 '22 06:10

Dean Radcliffe


Also I noticed no one has mentioned it but there is also for chrome a 'Meteor DevTools' extension that you can add to chrome tools. Once your meteor project is running you can see in chrome tool a tab called 'Meteor' that will show you what MiniMongo has.

like image 22
Jose Avatar answered Oct 27 '22 06:10

Jose


There is a open source MongoDB management tool called Robomongo — which is very efficient and useful.

like image 41
Gemcode Avatar answered Oct 27 '22 08:10

Gemcode


There is an awesome atmosphere package meteor toys that shows the subscribed data on minimongo. It also allows to add, edit or delete data on the go. very handy.

Also, meteor toys may not work with latest meteor update (1.6.1+). So, I found a light package that does the same called constellation.

You can choose from anyone. It will surely help debugging on minimongo easier.

like image 26
Ashish Agrawal Avatar answered Oct 27 '22 08:10

Ashish Agrawal


You can use the Chrome plugin Meteor MiniMongo Explorer, it's very useful and show you every collections/documents you have currently on your MiniMongo

Pro compared to Mongol

You don't need to add any package to your meteor project to works

like image 32
Arthur Avatar answered Oct 27 '22 08:10

Arthur


Open the console and do it:

Meteor.connection._mongo_livedata_collections[collectionName].find().fetch()

My current Meteor's version is 1.8.1. I don't know it is possible to do the same on the older ones.

like image 22
Hellon Canella Machado Avatar answered Oct 27 '22 07:10

Hellon Canella Machado