1

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.

Rob
  • 14,746
  • 28
  • 47
  • 65
Ramesh Murugesan
  • 4,727
  • 7
  • 42
  • 67

1 Answers1

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