I have to meteor application in local (admin and client). Applications run on different port 3000 and 3003. I want to use both app should use the same DB. export MONGO_URL=mobgodb://127.0.0.1:3001/meteor will be okay. But I would like to know any argument to pass with meteor command to setup environment variable to use the same DB.
            Asked
            
        
        
            Active
            
        
            Viewed 31 times
        
    1
            
            
        
        Rob
        
- 14,746
 - 28
 - 47
 - 65
 
        Ramesh Murugesan
        
- 4,727
 - 7
 - 42
 - 67
 
- 
                    Refer to this [question](http://stackoverflow.com/questions/28135868/can-i-use-the-same-db-for-multiple-meteor-apps) – Jesper Jun 03 '16 at 11:25
 - 
                    @Jesper. I just want this for development. for production, we can setup env variable `MONGO_URL`. I don't like to use `_driver` option in `Mongo.Collection` – Ramesh Murugesan Jun 03 '16 at 11:33
 - 
                    @BlueBells are you just looking for a startup script so you have to do less typing? – David Weldon Jun 03 '16 at 11:52
 - 
                    @DavidWeldon exactly :) – Ramesh Murugesan Jun 03 '16 at 12:14
 
1 Answers
3
            If you are looking for a start script you could do the following:
In the root of your app, create a file called start.sh:
#!/usr/bin/env bash
MONGO_URL=mobgodb://127.0.0.1:3001/meteor meteor --port 3000
Then run chmod +x start.sh
You can then start your app just by typing ./start.sh
        David Weldon
        
- 63,632
 - 11
 - 148
 - 146