问题
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?
回答1:
Couldn't find a good solution. So I need to go in my heroku mongohq interface, and manually remove all collections, then restart heroku.
回答2:
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')
来源:https://stackoverflow.com/questions/21962602/meteor-reset-on-heroku