6

I have just started playing around with Meteor and MongoDB for the first time. I come from a .net developer background and MSSQL. I have created a simple web following this tutorial. Also, I have added the accounts-password package to my app as well. Everything works like a charm, I can add data to my application in real time and I can create users and login, etc, etc. However, when I open up Robomongo and look for the stored data, I do not find any information inside my 'carbrands' collection declared in carbrands.js as

CarBrands= new Meteor.Collection("carbrands");

Also, no users collection is created. My Robomongo profile is connected to localhost. If I try to access CarBrands from Chrome console i get the following output:

> CarBrands.find();
> LocalCollection.Cursor {collection: LocalCollection, selector_id: undefined, selector_f: function, sort_f: null, skip: undefined…}

Where is the meteor data being saved to and how can i view it ?

UPDATE**: I have run mongo command in linux terminal and the result returned are local and test. test is empty. Accessing local returns the same collections as viewed in Robomongo

ivan
  • 665
  • 3
  • 8
  • 23

2 Answers2

3

You need to run:

meteor mongo

from your project, not your usual mongoDB install:

http://docs.meteor.com/#meteormongo

7zark7
  • 10,015
  • 5
  • 39
  • 54
  • so from my understanding so far, meteor creates its own instance of mongodb? Which brings up multiple questions such as is there any way to specify to meteor use my instance of mongodb that i can view in robomongo? or any way to connect robomongo to meteor mongo instance? – ivan Jan 02 '14 at 04:09
  • got the answer to my last question from here http://stackoverflow.com/questions/15363710/where-is-the-meteor-monogodb-database?rq=1 – ivan Jan 02 '14 at 04:15
  • so the only qustion i have left is can i specify a mongodb install server to be used instead of project mongo – ivan Jan 02 '14 at 04:16
  • 1
    Set MONGO_URL env, answer here: http://stackoverflow.com/questions/10588038/how-to-use-the-existing-mongodb-in-a-meteor-project – 7zark7 Jan 02 '14 at 07:30
  • perfect, thanks! that's a great start to my meteor experience – ivan Jan 02 '14 at 17:02
1

Meteor stores local mongo datasets in APPDIR/.meteor/local/db. A ps will verify DB location.

ps -ax | grep mongo 1482 ? Sl 170:02 /usr/bin/mongod --config /etc/mongodb.conf 2176 ? Sl 174:46 /home/ell/.meteor/packages/meteor-tool/.1.4.2_3.qrhx4m++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/mongodb/bin/mongod --bind_ip 127.0.0.1 --port 3001 --dbpath /apps/assessment/current/.meteor/local/db --oplogSize 8 --replSet meteor --nojournal