admin管理员组文章数量:1421000
I was coding along with the Meteor simple colours example screencast. After inserting some colours into the database via the Chrome JS Console (1:08 in the video):
Colors.insert({name: "red"});
Colors.insert({name: "green"});
I wanted to see if I could find this same data in the mongo console:
$ meteor mongo
MongoDB shell version: 2.2.1
connecting to: 127.0.0.1:3002/meteor
> show dbs
local (empty)
meteor 0.0625GB
> use meteor
switched to db meteor
> show collections
colors)
system.indexes
> db.colors.find()
>
Nothing.
Why is there no data in there?
Also why is there a ")" after the "colors" collection name, is that related?
This is my .js file:
Colors = new Meteor.Collection("colors)");
if (Meteor.isClient) {
Template.colour_list.colors = function()
{
return Colors.find({}, {sort : {likes: -1, name: 1}});
};
}
I was coding along with the Meteor simple colours example screencast. After inserting some colours into the database via the Chrome JS Console (1:08 in the video):
Colors.insert({name: "red"});
Colors.insert({name: "green"});
I wanted to see if I could find this same data in the mongo console:
$ meteor mongo
MongoDB shell version: 2.2.1
connecting to: 127.0.0.1:3002/meteor
> show dbs
local (empty)
meteor 0.0625GB
> use meteor
switched to db meteor
> show collections
colors)
system.indexes
> db.colors.find()
>
Nothing.
Why is there no data in there?
Also why is there a ")" after the "colors" collection name, is that related?
This is my .js file:
Colors = new Meteor.Collection("colors)");
if (Meteor.isClient) {
Template.colour_list.colors = function()
{
return Colors.find({}, {sort : {likes: -1, name: 1}});
};
}
Share
Improve this question
asked Dec 7, 2012 at 19:00
nickponlinenickponline
26k34 gold badges106 silver badges179 bronze badges
1 Answer
Reset to default 5Yes, remove your ) and try again ...
Colors = new Meteor.Collection("colors");
本文标签: javascriptWhere is Meteor data in MongoStack Overflow
版权声明:本文标题:javascript - Where is Meteor data in Mongo? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745338715a2654162.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论