Using Meteor in a Shared Folder Environment (Posted on June 15th, 2013)

I've been looking to do more Node.js/Meteor development lately, however, I ran in to a problem with the way Meteor handles it's app structure. By default meteor places the MongoDB database inside the application folder. I use a shared folder on a Windows host with an Ubuntu Virtualbox for my development environment. By having the shared folder as part of an NFS share MongoDB kind of flips out and doesn't run which causes meteor to error out.

The solution for this is to essentially have two app folders. One contains your ".meteor" folder which contains your database and packages. The other will sit in the shared folder and contain your applications javascript, css, html, etc files. We can map the ".meteor" folder in the NFS share to the other folder by binding it like such:

#In your home directory
meteor create newproject

#In your shared folder
meteor create newproject

#Virtual machine location first followed by shared folder location
sudo mount --bind ~/newproject/.meteor /media/sf_Program_Archive/newproject/.meteor

You run your meteor application as you normally would from your shared folder. When meteor goes to access the ".meteor" folder it will instead be routed to the one on your virtual machine. Everything should now work as it normally would.

Thanks for reading!

Tags: Meteor