Reaction Commerce Forums

Connect with remote database


#1

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

I tried 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.


#2

You should set MONGO_URL as an environment variable before starting Reaction. Can you try and report back?


#3

Yup that works. But it would be nice if it could be read from a config.json file


#4

@shabin You can also use a .env file to make it easier. This is what I’d do in your case.