0

How can I connect my local running reaction app with a remote mongodb?

I tried creating this settings.json file

{
    "env" : {
        "MONGO_URL" : "<remote db url >"
    }
}

And ran the app with this command

meteor run --inspect-brk --settings settings.json

But it still connects to local meteor mongo. Could someone tell me the correct syntax to configure mongo.

Shabin Muhammed
  • 1,092
  • 2
  • 18
  • 29

1 Answers1

1

Use a .env file at the root of your reaction directory, defining MONGO_URL (and any other environment variable you may need) this way:

MONGO_URL=<MongoDB URL>
Loan Laux
  • 71
  • 4