How can I set different MONGO_URL for different projects?


#1

I would like to have my meteor apps use Mongo databases that I specify. Also, I develop many different meteor apps and they all use different MONGO_URLs. Apparently it does not work for me to set MONGO_URL in my settings.json file. I don’t want to set it as an environment variable either, since I don’t want it shared between all my projects. So what can I do?


#2

Environment variables are not shared between projects or processes unless you set them globally.

You can easily create a bash script that runs Meteor with the environment you need for your project and keep it in the same folder.


#3

Thats a great idea – how can I learn to think like this?


#4

http://linuxcommand.org/tlcl.php - I read this book when I installed my first Linux distro. I think it is very helpful to get to know at least the basic tooling available to you on your OS.