我已经为我的流星应用程序编写了一些测试。由于他们具有删除所有文档或填充新文档的设置和拆卸方法,因此我想在专用于测试的数据库上运行它们。
我注意到数据库存储在 .meteor/local/db 中。理想情况下,我希望从不同的端口访问 db_test 和 db_dev。
这可能吗?
你必须运行两个mongod
过程例如
# Dev
mongod --port 27017 --dbpath .meteor/local/db_dev
# Testing
mongod --port 28017 --dbpath .meteor/local/db_test
[Edit] This should work. Using the leaderboard example project:
MONGO_URL="mongodb://127.0.0.1:27017/appname_dev" meteor run --port 3000
MONGO_URL="mongodb://127.0.0.1:28017/appname_test" meteor run --port 4000
这将使用单独的数据库。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)