Shabin Muhammed
Shabin Muhammed

Reputation: 1142

Connect local ReactionCommerce app with remote database

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.

Upvotes: 0

Views: 109

Answers (1)

Loan Laux
Loan Laux

Reputation: 71

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>

Upvotes: 1

Related Questions