连接 mongolab 服务器的流星

Meteor with connection mongolab server

连接字符串:

To connect using the shell:
mongo ds031183.mongolab.com:31183/mara -u <dbuser> -p <dbpassword>
To connect using a driver via the standard URI (what's this?):
mongodb://<dbuser>:<dbpassword>@ds031183.mongolab.com:31183/mara

如何在流星中连接远程数据库?

启动meteor时添加MONGO_URL环境变量

$ MONGO_URL=mongodb://<dbuser>:<dbpassword>@ds031183.mongolab.com:31183/mara meteor