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,107
  • 28
  • 46
  • 64
Ramesh Murugesan
  • 4,420
  • 5
  • 38
  • 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
  • 61,942
  • 11
  • 142
  • 141