title: Paginate blog with AngularJS Mongoose Express
body: <p>I would like to paginate my blog with AngularJS / Bootstrap client side and Mongoose / Express server side. Actually I make a call to my rest API which return every blogposts i've got in my DB:</p>
  
  <p>Server side <strong>lib/controllers/blogs.js</strong></p>
  
  <pre><code>/**
   * List of Blogs
   */
  exports.all = function(req, res) {
    Blog.find().sort('-created').populate('creator', 'username').exec(function(err, blogs) {
      if (err) {
        res.json(500, err);
      } else {
        res.json(blogs);
      }
    });
  };
  </code></pre>
  
  <p>I would like to just get those which are on the actual page, but I don't really know how to do it as I'm calling GET /api/blogs. </p>
  
  <p>Server side <strong>lib/config/routes.js</strong></p>
  
  <pre><code>  var blogs = require('../controllers/blogs');
    app.get('/api/blogs', auth.ensureAuthenticated, blogs.all);
  </code></pre>
  
  <p>Maybe someone could help me to do it ? I'm totally new to Node.js. </p>