Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有模数数据库的URI,但我不知道如何通过meteor mongo连接到它。我可以使用什么命令?
使用 Meteor 连接到外部 Mongo 数据库的最简单方法是在启动 Meteor 时使用环境变量:
$ export MONGO_URL="mongodb://user:password@address.com/dbname" $ meteor run
mongo 连接字符串的语法是
mongodb://<username>:<password>@<host>/<database>?<options>
使用模数托管时,它们有一个专用页面,您可以在其中设置环境变量。