title: Browserify execute a module code only once , on multiple require calls
body: <p>app.js</p>
  
  <pre><code>var MedicineManager = new Marionette.Application();
  
  MedicineManager.addRegions({
      mainRegion: "#main-region"
  });
  
  MedicineManager.navigate = function (route, options) {
      options || (options = {});
      Backbone.history.navigate(route, options);
  };
  
  MedicineManager.getCurrentRoute = function () {
      return Backbone.history.fragment;
  };
  
  MedicineManager.on("start", function () {
      if (Backbone.history) {
          Backbone.history.start();
      }
  });
  
  $(function () {
      MedicineManager.start();
  })
  
  module.exports=MedicineManager;
  </code></pre>
  
  <p>I am trying to move my app from Marionette module pattern to Browserify.</p>
  
  <p>I am calling <code>require('app')</code> in multiple files, and this causes the code in app.js to execute everytime a <code>require('app')</code> call is made.</p>
  
  <p>Because of this I am getting error that <code>Backbone.history has already been started</code>.
  The solution to this problem is that the code be called only once at initialization.</p>
  
  <p>How do I solve it?</p>