0

You can use MONGO_URLenv variable to tell meteor to connect to your instance of mongodb. Great.

For instance:

MONGO_URL=mongodb://localhost:27017/my_project meteor works. I see the new documents in my robomongo on localhost in a database named my_project.

But if I do:

MONGO_URL=mongodb://localhost:27017/my_project meteor reset, the database my_project stays unchanged. meteor reseting works when I use the meteor-provided mongodb (when I don't supply MONGO_URL).

Things I tried:

  • EXPORTing MONGO_URL instead of putting it in front of the command. Doesn't help.

Also to what mongo instance do meteor connects to if I just run meteor (the default one) ? I can't find any meteor database on my localhost

Community
  • 1
  • 1
Benjamin Crouzier
  • 40,265
  • 44
  • 171
  • 236
  • To open robomongo on default mongo server created by meteor: In robomongo: `File > Connect > Create > name: 'Meteor default', address: 'localhost:3001' > Connect`. Your collections are in `Meteor > collections`. `meteor` server must be started for this to work. – Benjamin Crouzier Aug 25 '14 at 21:11

2 Answers2

1

If you don't specify a MONGO_URL, then mongo will create a database in your .meteor directory tree and run it on 127.0.0.1:3001. The mongo reset command seems to just remove the local files for those. To reset your external mongo db for your meteor app you can just remove the my_project db: mongo my_project -> db.dropDatabase().

Christian Fritz
  • 20,641
  • 3
  • 42
  • 71
1

From the source code for the 'reset' command

if (options.args.length !== 0) {
  process.stderr.write(
    "meteor reset only affects the locally stored database.\n" +
    "\n" +
    "To reset a deployed application use\n" +
    "  meteor deploy --delete appname\n" +
    "followed by\n" +
   "  meteor deploy appname\n");
  return 1;
}
Rob Race
  • 196
  • 1
  • 4