如何在本地指定 Meteor MongoDB 版本?

问题描述:

在开发中运行 Meteor 时,如何将 3.0 指定为我的 MongoDB 版本?WiredTiger 安装在本地,我想在我的 Meteor 应用中使用它.

How would I go about specifying 3.0 as my MongoDB version when running Meteor in development? WiredTiger is installed locally and I'd like to play around with it from my Meteor apps.

meteor help run 没有标志.Meteor repo 表示支持,但没有说明如何运行.在 Meteor 上也有类似的问题未回答的论坛.

meteor help run doesn't have a flag for it. The Meteor repo indicates its supported, but not how to run it. And there was a similar question on the Meteor forums that wasn't answered.

感谢任何帮助.

您不必向meteor 传递任何参数,只需指定要运行的mongodb.这不仅适用于生产,也适用于开发,例如:

You don't have to pass any parameters to meteor, just specify the mongodb you want to run with. This works not just in production, but in development as well, e.g.:

env MONGO_URL=mongodb://localhost:27017/meteor meteor

这将运行当前文件夹中的meteor 项目,但使用在标准端口上的本地主机上运行的mongodb.这适用于 mongodb 3.0.

This will run the meteor project in the current folder, but use the mongodb running on localhost on the standard port. This works with mongodb 3.0.