[英]Where Does Meteor Store It's Data?
I have just started playing around with Meteor and MongoDB for the first time. 我刚开始玩Meteor和MongoDB。 I come from a .net developer background and MSSQL.
我来自.net开发人员背景和MSSQL。 I have created a simple web following this tutorial .
我在本教程后创建了一个简单的Web。 Also, I have added the accounts-password package to my app as well.
此外,我还将account-password包添加到我的应用程序中。 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
一切都像魅力一样,我可以实时向我的应用程序添加数据,我可以创建用户和登录等等。但是,当我打开Robomongo并查找存储的数据时,我在我的内部找不到任何信息'carbrands'系列在carbrands.js中宣布为
CarBrands= new Meteor.Collection("carbrands");
Also, no users collection is created. 此外,没有创建用户集合。 My Robomongo profile is connected to localhost.
我的Robomongo配置文件已连接到localhost。 If I try to access CarBrands from Chrome console i get the following output:
如果我尝试从Chrome控制台访问CarBrands,我会得到以下输出:
> 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. UPDATE * * :我在linux终端运行了mongo命令,返回的结果是本地和测试。 test is empty.
测试是空的。 Accessing local returns the same collections as viewed in Robomongo
访问本地返回与Robomongo中查看的相同的集合
You need to run: 你需要运行:
meteor mongo
from your project, not your usual mongoDB install: 从你的项目,而不是你通常的mongoDB安装:
http://docs.meteor.com/#meteormongo http://docs.meteor.com/#meteormongo
Meteor stores local mongo datasets in APPDIR/ .meteor/local/db . Meteor在APPDIR / .meteor / local / db中存储本地mongo数据集。 A ps will verify DB location.
ps将验证DB位置。
ps -ax | ps -ax | grep mongo 1482 ?
grep mongo 1482? Sl 170:02 /usr/bin/mongod --config /etc/mongodb.conf 2176 ?
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
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.