title: Sort Bookshelf.js results with .orderBy()
body: <p>I am working on a personal project to learn Node.js + express + Bookshelf.js. Where do I build queries? In particular, how do I simply set an 'ORDER BY' or 'WHERE' in the following code?</p>
  
  <pre><code>var Accounts = require('../collections/accounts').collection;
  
  new Accounts().fetch({
      withRelated: ['folders']
  }).then(function(collection) {
      // process results
  });
  </code></pre>
  
  <p>I would like to learn Bookshelf.js because it seems to offer the features I am used to with Laravel's Elequent (PHP), such as polymorphic relationships and sub expressions. However, I'm finding that the documentation is not very in-depth and trying to find examples is near impossible.</p>
  
  <p>Thanks in advance for any help.</p>
  
  <p>Robin </p>