5
メテオールのシンプルなカラーであるexample screencastと一緒にコーディングしていました。クロームJSコンソール(ビデオで1:08)を経由してデータベースにいくつかの色を挿入した後:Mongoの流星データはどこですか?
Colors.insert({name: "red"});
Colors.insert({name: "green"});
私はモンゴコンソールでこの同じデータを見つけることができるかどうかを確認したかった。
$ 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}});
};
}
感謝。非常に恥ずかしい。 – nickponline