title: routing in mean.js (how to include middlware?)
body: <p>I'm trying to include a middleware (passport-http-bearer) in MEAN.js, however it uses a different routing syntax than Express 4.</p>
  
  <p>Express API sytnax is:</p>
  
  <pre><code>app.get('/', function(req, res){
    res.send('hello world');
  });
  </code></pre>
  
  <p>In MEAN.js routes are defined like this:</p>
  
  <pre><code>app.route('/articles')
      .get(articles.list)
      .post(users.requiresLogin, articles.create);
  </code></pre>
  
  <p>How do I include a middleware in the MEAN.js router (in my case passport-http-bearer to check for a token)?</p>
  
  <p>http-bearer's example implementation as middleware is:</p>
  
  <pre><code>app.get('/profile', 
    passport.authenticate('bearer', { session: false }),
    function(req, res) {
      res.json(req.user);
    });
  </code></pre>
  
  <p>How should I do this in MEAN.js?</p>