0

I'm trying to better understand the Meteor/MongoDB data model. When you create a new meteor project I'd like to know where the data in a collection is stored when you create a new collection or add data to a collection. I understand that it is supposed to be under the .meteor/local/db directory but thus far I have not found it. I've both created new collections and added data to preexisting collection to both the basic project and to the Meteor demo projects (like Leaderboard) and I can't find where this data is stored. Could someone please guide me on this matter?

I imagine that I would at least see a JSON type list somewhere or a GUI similar to something like a MYSQL work bench (is there anything out there like this for Meteor - I've looked high and low but I haven't found it; Houston is insufficient).

In addition to scouring Stack Overflow for the answer to this question I've looked through a number of APIs (like Meteor's and Mongo's) and tutorials like http://meteortips.com/book/databases-part-1/

Again all I want to know is how can I see the data in Mongo as it is added to a collection. Thank you.

rashadb
  • 2,515
  • 4
  • 32
  • 57

3 Answers3

0

The data files are in the mongodb format; and are not human readable.


If you want to query mongo directly --

while meteor is running (from your app's directory)

meteor mongo

If meteor isn't running, and you want to launch just the database, you can try:

mongod --smallfiles --dbpath /path/to/my/app/.meteor/local/db --port 3001

Then connect with the regular mongo shell.

nathan-m
  • 8,875
  • 2
  • 18
  • 29
0

To access database in nice GUI form I use Robomongo.

What is nice you can connect to local (on port 3001) or production mongodb from it (see how to do that).

Update:

Remember to run meteor command before connecting to local mongodb. Thanks @iAmME

Community
  • 1
  • 1
Kuba Wyrobek
  • 5,273
  • 1
  • 24
  • 26
0

I have been using MONOVUE (http://www.mongovue.com/downloads/) for viewing the collections and it has been very handy in checking the data.

The different kinds of views : Table View, Tree View and Text View make it easier to understand how the data is inserted especially for anyone(like me) jumping from RDBMS to NOSQL.

Hima13
  • 1
  • How ironic. When I was on a Windows machine it seemed like all the cool software was always on Mac. Now that I'm forced to use Mac for Meteor (started that about 5 days ago) the best stuff is on Windows. SMH . . . – rashadb Sep 04 '14 at 18:37