在Meteor + React中导入MongoInternals

时间:2017-02-19 20:22:04

标签: javascript mongodb meteor meteor-react

我需要连接外部MongoDb数据库

我的代码 /imports/api/Connection.js

import { MongoInternals } from 'meteor/mongo'; // i am probably wrong here!!
import CONST from './Constants.js';

let Connection = new MongoInternals.RemoteCollectionDriver(CONST.mongo);
export {Connection};

/imports/api/ABC.js

import {Connection} from './Connection.js';
let ABC = new Mongo.Collection('abc', {
    _driver: Connection
});
export {
    ABC
};

它返回未定义的MongoInternals我没有找到从哪里导入MongoInternals的任何地方。

请帮我找到解决方案

由于

0 个答案:

没有答案