I don’t recall installing MongoDB locally and am just curious where the databases are installed. Phpstorm has a feature to add the data source which I think will help me visualize/learn what I’m doing to the model. Do you guys know where meteor creates the database files? I’m on Ubuntu 18.04
Each app under development gets its own DB. From your app’s root:
.meteor/local/db
Thanks, looks like my half finished to-do list has 8 collections already. Any way to determine which one is the desired data source (the one storing the to-dos)? Ubuntu doesn’t have any associated programs for the .wt extension.
You probably want to connect to the database, rather than look at the storage.
Start your app:
meteor run
then in another console in your app’s root, do
meteor mongo
That will give you access to the MongoDB shell, where you can use any of MongoDB’s commands. For example:
show collections
db.someCollectionName.find().pretty()
and so on.
.wt is the file extension for the WiredTiger storage engine.
If you want a GUI to look at your db, while your app is running, MongoDB have a desktop app called Compass.
https://www.mongodb.com/products/compass
rather than doing it from the command line (ie meteor mongo) as @robfallows mentioned above…
It will let you connect to the local Meteor db, using the next available port number where Meteor is running.
So if you just invoke your app with “meteor” on the command line, the default app port will be 3000, you know, access your app at localhost:3000 - the db will be available at port 3001, so in Compass, you’d specify the mongo url to be localhost:3001
Once your application is running, you can get the connection URL with meteor mongo --url
Much better answer than mine for getting the mongo url! Thanks for reminding me.
I just love how the Meteor community help squad have descended on this question!