Where Does Meteor Store It's Data?

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


You need to run:

meteor mongo

from your project, not your usual mongoDB install:

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


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

链接地址: http://www.djcxy.com/p/76680.html

上一篇: System.nanoTime与System.currentTimeMillis

下一篇: 流星在哪里存储数据?