我刚刚使用express,passport和mongodb在nodejs中完成了一个REST服务器应用程序
我想为那个mongodb REST api的LIVE Statistics创建一个流星应用程序,比如连接数,用户在线等。
但我无法找到一种方法来使用定制mongodb与流星。 基本上我想与nodejs / express应用程序和meteor共享相同的数据库。
可能吗? 我确信它应该是,但我无法弄清楚如何!
请帮忙!
I just finished a REST server application in nodejs using express, passport and mongodb
I want to create a meteor app for the LIVE Statistics of that mongodb REST api's , like number of connections, user online etc.
But I can't figure out a way to use custom mongodb with meteor. Basically I want to share the same database with nodejs/express application and meteor.
Is it possible? I am sure it should be, but I can't figure out HOW!
Help please!
最满意答案
好的,我到这里该做什么。
在部署meteor时,他们可以选择数据库。
所以我在meteor上创建了一个应用程序,然后将其部署到nodejs
这是怎么回事
meteor bundle myapp.tgz
提取myapp.tgz并使用下面的命令。
PORT = 3000 MONGO_URL = mongodb:// localhost:27017 / myapp node bundle / main.js
这是完整的文档: http : //docs.meteor.com/#deploying
Okay, I got here what to do.
While deploying meteor, they have an option to choose the database.
So i created an app on meteor and then deployed it for nodejs
here is how,
meteor bundle myapp.tgz
extracted myapp.tgz and used the command below.
PORT=3000 MONGO_URL=mongodb://localhost:27017/myapp node bundle/main.js
Here is complete doc : http://docs.meteor.com/#deploying
更多推荐
发布评论