How do I connect meteor app server to mongo server?

I tried setting the environment using export MONGO_URL: http://[host]:[psw][port]/dbName on my app server. I couldn’t connect to my mongo server.


Then I tried editing mup.json file. I inserted MONGO_URL: http://[host]:[psw][port]/dbName. I still couldn’t get it work.

Meteor app is hosted on ec2 server. (node/meteor installed only, no mongodb)
Mongodb is hosted on another ec2 server. (mongodb installed only, no meteor/node)

What should I do on my app server? What should I do on my mongo server? Can someone please guide me on this? A step-by-step guide would be much appreciated. Thank you!

I think this question has been covered here: Manually Installing Mongo on EC2

@skaxwng There’s a mistake in above Mongo URL. You need to use mongodb:// instead of http:// protocol.

1 Like