Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor似乎没有自动发布_Meteor - Fatal编程技术网

Meteor似乎没有自动发布

Meteor似乎没有自动发布,meteor,Meteor,考虑以下几点: >> meteor mongo > show collections; pages system.indexes > db.pages.count(); 2 > db.pages.findOne(); { "_id" : "aec73d51-bb70-4e5b-90fe-a86bb5e5592f", "content" : "tuna fish sandwitches\nare super delicious! I mean real

考虑以下几点:

>> meteor mongo
> show collections;
pages
system.indexes
> db.pages.count();
2
> db.pages.findOne();
{
    "_id" : "aec73d51-bb70-4e5b-90fe-a86bb5e5592f",
    "content" : "tuna fish sandwitches\nare super delicious! I mean really delicous",
    "created_at" : 1337353376284,
    "name" : "My first page"
}
但当我从meteor客户端运行以下命令时:

> Pages = new Meteor.Collection('pages');
> Pages.findOne();
它产生
未定义的

另请注意:

>> Pages.find().count();
>> 0
我没有禁用自动发布。我是否需要做一些明确的事情来将db与MiniMongo缓存同步


Meteor 0.3.6 | Mongo 2.0.2

Meteor不会自动发布Mongo数据库中的所有内容——只是定义的集合。因此,您只需要在服务器上使用与客户机上相同的声明

// client and server code
Pages = new Meteor.Collection('pages');

你的TL;DR可能只是问题的标题。smart——编辑,我刚刚了解了TL;博士的意思是,我太激动了!;)