How to update a variable's value reactively from 'Meteor startup'


Hi, I am trying to add some general app configuration for a project I am working on, and I decided to save this on the database so that I can change them from some other place if things go wrong with the app, the main reason I am doing this is to add a ‘maintenance mode’ whenever I am making changes to the app or during deploys or something like that, the way I’m trying do this is with a variable I set with this code:

 Meteor.startup(function() {
  Tracker.autorun(function () {
    Meteor.subscribe('configuracion', function(){
      configuracionGeneral = Configuracion.findOne({});

However, when I try to use it like this with iron router:

Router.onBeforeAction(function () {
    //Send to maintenance template

I can use the variable configuracionGeneral with no problem and I see it on the console, but when I change the values of it on the database the variable doesn’t change ‘reactively’, so I would like to know how can I change this variable ‘reactively’.


Have you looked at ?


Thanks for the link, the thing is that I would like to change the settings from the database, so that I can change them without the need to re-deploy my code in case I need to change something. And with this package I am afraid I would need to re-deploy my app everytime I had to change the settings, and that is something I am currently having a lot of trouble with. (hot code push on Cordova)