Mongo中的meteor数据在哪里?
我正在编写Meteor简单颜色示例截屏 。 通过Chrome JS控制台(video中的1:08)将一些颜色插入数据库之后:
Colors.insert({name: "red"}); Colors.insert({name: "green"});
我想看看是否可以在mongo控制台中find相同的数据:
$ 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() >
没有。
为什么那里没有数据?
为什么在“颜色”集合名称后面有一个“)”,是相关的?
这是我的.js文件:
Colors = new Meteor.Collection("colors)"); if (Meteor.isClient) { Template.colour_list.colors = function() { return Colors.find({}, {sort : {likes: -1, name: 1}}); }; }
是的,删除你的),然后再试一次…
Colors = new Meteor.Collection("colors");
- 在Node.js中发送获取请求时获取HPE_INVALID_TOKEN_ERROR
- 将variables从Node.js服务器传递给静态页面脚本
- 如何在sequelize迁移中使用insert()?
- 在内存中的JS对象中可以容纳多less个socket.io对象,然后才能显着降低性能?
- 错误:无法读取未定义的属性'get' – node.js中的HTTPS
- 当HOST在app.listen(PORT,HOST)中设置时,app.address()如何为空;
- 在javascript / node.js中连接到Gmail IMAP API
- Node.js:分割n部分的stream内容
- 如何从BASH中的节点脚本访问返回值?