How do I connect meteor app server to mongo server?


#1

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

SO: http://stackoverflow.com/questions/10588038/how-to-use-the-existing-mongodb-in-a-meteor-project
SO: http://stackoverflow.com/questions/21971036/mongodb-meteor-export-mongo-url-to-deployed-applications

Then I tried editing mup.json file. I inserted MONGO_URL: http://[host]:[psw]@website.com:[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!


#2

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


#3

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