如何在流星中访问 mongos db.system.js? [英] How do I access mongos db.system.js in meteor?
本文介绍了如何在流星中访问 mongos db.system.js?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以使用meteor mongo 很好地访问它,但我需要在服务器上访问它...我该怎么做?
I can access it fine using meteor mongo but I need access to it on the server... How do I do that?
我试过了:
Meteor.system.js.save()
db.system.js.save()
System.js.save()
推荐答案
你应该可以通过 node mongo 驱动直接访问它就像这个问题.所以对于 system.js
集合,我认为你使用:
You should be able to access it through the node mongo driver directly as in this question. So for the system.js
collection I think you use:
// on server
var db = MongoInternals.defaultRemoteCollectionDriver.mongo.db;
var systemJS = db.collection('system.js');
这个问题展示了节点驱动程序的一些非流星代码示例.
This question shows some non-meteor examples of code for the node driver.
这篇关于如何在流星中访问 mongos db.system.js?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文