How to: run meteor mongo database without running meteor?

So when you run meteor, by default, it will create a mongo database.

Is there any way to connect to this mongo db? I am trying to create some scripts that will make some managerial tasks, such as downloading some data from the database within my npm scripts.

Here’s a quick local example:

  1. Run meteor mongo -U to get your Mongo connection string.
  2. You can then connect using this URL with any Mongo client. For example, using the mongo command line client: mongo mongodb://

The only problem with that solution is, if meteor is not running a local meteor instance, it will cause it to throw an error

You can install a separate MongoDB server on your machine. That way it will always run, regardless of whether you actually run the app. Depending on your OS it may be as simple as issuing one command. For example, on OSX (if you have Homebrew installed):

brew install mongodb

Then you can run Meteor and connect to this database by running a command like this:

MONGO_URL="mongodb://" meteor