title: Node + Express + Bookshelf
body: <p>I'm new to Node world. I want to build a Node+Express+Bookshelf (forget the front end for now). I'm following this <a href="http://blog.ragingflame.co.za/2014/12/16/building-a-simple-api-with-express-and-bookshelfjs" rel="nofollow">tutorial</a>.</p>
  
  <p>But I want to refactor to what a Node structure looks like:</p>
  
  <pre><code>app/
      controller/
      models/
  ...
  server.js
  gruntFile.js
  ...
  </code></pre>
  
  <p>As I am still new to this world, I cannot figure out where the initialization goes,</p>
  
  <pre><code>Bookshelf.DB = Bookshelf.initialize({
      client: 'postgres',
      connection: {
          ....
      }
  });
  </code></pre>
  
  <p>And how to write my model inside the <code>app/models/users.server.model.js</code> would go. This is what I have:</p>
  
  <pre><code>'use strict';
  
  var Bookshelf = require('bookshelf').DB;
  
  exports.model = Bookshelf.Model.extend({
      tableName: "users",
  });
  </code></pre>
  
  <p>And finally, how do I use my model in some other file?</p>