Reputation: 41895
You can use MONGO_URL
env 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 reset
ing works when I use the meteor-provided mongodb (when I don't supply MONGO_URL
).
Things I tried:
EXPORT
ing 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
Upvotes: 0
Views: 1151
Reputation: 206
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;
}
Upvotes: 1
Reputation: 21364
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()
.
Upvotes: 1