Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor reset on Heroku

What is the best way to redeploy an alpha version on Heroku, and perform a meteor reset for the server mongo fixtures to be re-executed on the server?

like image 288
Adrien Lemaire Avatar asked Feb 23 '14 00:02

Adrien Lemaire


2 Answers

Couldn't find a good solution. So I need to go in my heroku mongohq interface, and manually remove all collections, then restart heroku.

like image 162
Adrien Lemaire Avatar answered Oct 06 '22 14:10

Adrien Lemaire


I resolved this with a custom method for any hosting(only debug, not in Production):

in /server/reset.js

 Meteor.methods({
   resetear: function() {

     Collection1.remove({});
     Collection2.remove({});
     //And Update Any Collection 3, Flush array embeded
     Collection3.update({},{$set:{'usersenrol':[]}},{'multi':true});

   }
});

And then, in the Client Console:

Meteor.call('resetear')
like image 27
Danilo Paez Avatar answered Oct 06 '22 15:10

Danilo Paez