如何在 Meteor 项目中使用现有的 MongoDB? [英] How do I use an existing MongoDB in a Meteor project?

查看:23
本文介绍了如何在 Meteor 项目中使用现有的 MongoDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设有一个用于 GUI 客户端的正在运行的 MongoDB 服务器(来自 wxPython)用于尽管.

Let's say there is a running MongoDB server for a GUI client (by wxPython) for a while.

如何将我的新 Meteor 项目连接到我现有的 MongoDB?

How could I connect my new Meteor project to my already existing MongoDB?

推荐答案

使用环境变量 MONGO_URL.类似的东西:

Use the environment variable MONGO_URL. Something like:

export MONGO_URL=mongodb://localhost:27017/your_db

meteor 或任何你想使用的数据库替换 your_db.

Replace your_db with meteor or whatever db you want to use.

这篇关于如何在 Meteor 项目中使用现有的 MongoDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆