Hitesh Joshi
Hitesh Joshi

Reputation: 724

share mongodb between nodejs and 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!

Upvotes: 3

Views: 987

Answers (1)

Hitesh Joshi
Hitesh Joshi

Reputation: 724

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

Upvotes: 5

Related Questions