I recently discovered that dropping the meteor test database using db.dropDatabase()
from the meteor mongo
shell is easier and more convenient than stopping the server, running meteor reset
, then waiting for the server to restart. Are there any cons or things that don’t work properly when doing this?
I wasn’t sure myself so I checked the Meteor source code on Github and found it here: https://github.com/meteor/meteor/blob/devel/tools/cli/commands.js#L1225. I’m posting from my iPad so I can tell word for work but whatever is in the .meteor/local
gets removed.
Meteor reset also helps fixing build problems for example. Some Meteor versions ago this was a really essential thing because there were some issues with building to different platforms for example.
In general you should not need it.
What could work is creating a function which fill the database on server start with some demo data. Give the demo data a field: demo = true.
And then create a Meteor method to delete all demo data.
Then you can even put in a button or call it from the console for testing.