title: How to make a handlebars helper global (in expressjs)
body: <p>I've got a pretty simple handlebars helper file in <code>helpers/handlebars.js</code>:</p>
  
  <pre><code>var hbs = require('express-handlebars');
  
  hbs.registerHelper("inc", function(value, options) {
      return parseInt(value) + 1;
  });
  </code></pre>
  
  <p>However, as expected, I can't refer to the <code>{{#inc}}</code> helper because I didn't pass it into the <code>res.render()</code> function. Is there a way to make all helpers in my file global and "auto-included"?</p>
  
  <p><strong>edit:</strong></p>
  
  <p>After trying @1cgonza's awesome answer, I get:</p>
  
  <pre><code>hbs.registerHelper("inc", function(value, options) {
        ^
  TypeError: undefined is not a function
  </code></pre>
  
  <p>When running the app. Here's the <code>app.js</code>:</p>
  
  <pre><code>var engine      = require('express-handlebars');
                    require('./helpers/handlebars.js')(engine);
  
  app.engine('hbs',           engine({defaultLayout: 'layout', extname: 'hbs'}));
  app.set('view engine',      'hbs');
  </code></pre>
  
  <p>Any ideas?</p>