I have the URI of the modulus database, but I don't know how to connect to it through meteor mongo. What command can I use?
The easiest way to connect to an external Mongo database with Meteor is to use an environment variable when starting Meteor:
$ export MONGO_URL="mongodb://user:password@address.com/dbname"
$ meteor run
The syntax for the mongo connection string is
mongodb://<username>:<password>@<host>/<database>?<options>
When hosting with modulus they have a dedicated page where you can set environment variables.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.