I've been cleaning up my directories and noticed that each Meteor.js project takes up at least 77MB (and typically, more like 150MB)! To figure out what was happening, I went ahead and created a new app:
meteor create myapp
At this point, the folder takes up about 7kb. But after I do this
cd myapp
meteor
the folder size balloons up to 77MB.
After some digging around, I managed to pinpoint to size increase the .meteor/db
folder. More specifically, running the app creates these local*
files inside .meteor/db
which are each >16Mbs. I opened these and they're mainly just a long string of 0000
s with a few non-0000
s here and there.
If I start doing more -- adding data, to Meteor.collections
, etc -- the size balloons to 100+MB.
My questions
Running meteor in development mode (the default) creates an instance of mongodb for you under your .meteor
directory. It's huge, I know. But don't worry - this is only for development so you don't need to setup your own mongodb instance on your localhost. You can clean it up at any time by running:
$ meteor reset
When you go to deploy your app, you will bundle your project which does not include any of these files.
To add to what David Weldon said.
If the size of the app locally is an issue, you could always use a Mongo database that is not stored locally, like a mongodb-as-a-service provider such as: MongoLab or MongoHQ
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With