I do not like to use a large repeating command, and I was looking for a solution in which I will set a variable embedded in something, so every time I launch my meteorite application; MONGO_URL will automatically set the environment. So here is what I did:
In the package.json file, I replaced the initial parameter as follows:
"scripts": { "start": "MONGO_URL=mongodb://username: password@host _url:portnumber/dbname meteor run" },
Now every time I want to run my application; I run npm start instead of meteor or meteor run
Note: there is a flaw. Your db credentials will be exposed if you put your db credentials in the package.json file and add this file to version control.
source share