简体   繁体   中英

how to show my users collection with mongodb

I'm sorry for this (peraphs) stupid question ... I install meteor and mongodb in my windows computer and i start to write some apps. I don't understand how to use mongo for shoving my db app ... i open one shell in my app dir and launch mongod, in one more shell in the same folder i start mongo.

show dbs
local
use local
switched to db local
show collections
startup_log
system.indexes

Where are my collections? Where is users collection?

When your app is running use this command on a separate command line mongo 127.0.0.1:3001

Meteor keeps the collections in this server. After you run mongo on this server, by writing use meteor you can use db specific to your running app. And then you can display your collections with db.getCollectionNames()

To display all your MongoDB collections using the shell, you may check this answer: How to list all collections in the mongo shell?

You may also use a MongoDB GUI Tool such Robomongo

Meteor uses a library called Minimongo that's why it doesn't display if you run show dbs on your mongo shell.

By default it points to port 3001 hence if you are using Robomongo you can just make the set up to watch that port.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM