本地链接端口用 3001 image
外部部署的网站,可以用 meteor mongo 命令来连接
li@MacbookAir ~/Github/maodou$ meteor mongo maodou.meteor.com MongoDB shell version: 2.6.7 connecting to: production-db-d1.meteor.io:27017/maodou_meteor_com production-d:PRIMARY> help db.help() help on db methods db.mycoll.help() help on collection methods sh.help() sharding helpers rs.help() replica set helpers help admin administrative help help connect connecting to a db help help keys key shortcuts help misc misc things to know help mr mapreduce
show dbs show database names
show collections show collections in current database
show users show users in current database
show profile show most recent system.profile entries with time >= 1ms
show logs show the accessible logger names
show log [name] prints out the last segment of log in memory, 'global' is default
use <db_name> set current database
db.foo.find() list objects in collection foo
db.foo.find( { a : 1 } ) list objects in foo where a == 1
it result of the last line evaluated; use to further iterate
DBQuery.shellBatchSize = x set default number of items to display on shell
exit quit the mongo shell
production-d:PRIMARY> show dbs 2015-03-27T09:37:44.547+0800 listDatabases failed:{ "ok" : 0, "errmsg" : "unauthorized" } at src/mongo/shell/mongo.js:47 production-d:PRIMARY> show collections goals meteor_accounts_loginServiceConfiguration projects system.indexes system.users users production-d:PRIMARY> db.projects.find() { "name" : "毛豆网移动版", "description" : "在线协作学习社区", "url" : "https://github.com/limingth/maodou/", "steps" : [ { "description" : "Step 1: 下载项目代码", "snapshot_url" : "http://7xia8g.com1.z0.glb.clouddn.com/maodou-github.png" }, { "description" : "Step 2: 学习hands-on-meteor前5章", "snapshot_url" : "http://7xia8g.com1.z0.glb.clouddn.com/Snip20150326_13.png" }, { "description" : "Step 3: 项目体验 maodou.meteor.com", "snapshot_url" : "http://7xia8g.com1.z0.glb.clouddn.com/Snip20150326_17.png" } ], "_id" : "ZoW7Ncm36hjhRzD8S" } { "name" : "MeteorBB开源社区", "description" : "BBS论坛", "url" : "https://github.com/limingth/maodou/", "_id" : "iTXbgKS3s7p2PPnCy" } { "name" : "滴滴拉屎Meteor版", "description" : "山寨版", "url" : "https://github.com/limingth/maodou/", "_id" : "kDp3fBc3yeo5JL8Dz" } @limingth