Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor custom mongodb during development

Tags:

How would I use a (live running) MongoDB to develop another meteor app? I tried modifying (.meteor/server/server.js) and specifying MONGO_URL to no avail before running meteor.

This is without using the bundled MongoDB, it has to be a separate/custom one (basically of another meteor instance).

This can be done with the deploy method but what about the normal meteor run during development?

UPDATE: this does work however the client side implementation seems a bit glitchy

like image 987
Tarang Avatar asked Jun 25 '12 22:06

Tarang


1 Answers

As mentioned in the Unofficial Meteor FAQ, you can invoke Meteor with the MONGO_URL environment variable set to the desired instance:

MONGO_URL=mongodb://localhost:27017 meteor 

If your MongoDB handles multiple databases, you can indicate which one to use by appending it to the URL:

MONGO_URL=mongodb://localhost:27017/mydb meteor 

You can even prevent Meteor from starting a local Mongo instance in development by running:

MONGO_URL=none meteor 
like image 141
Blackcoat Avatar answered Sep 19 '22 05:09

Blackcoat