title: How to promisify a MySql function using bluebird?
body: <p>Some time ago I decided to switch from PHP to node. In my first projects I didn't want to use any ORM since I thought that I didn't need to complicate my life so much learning another thing (at the moment I was learning node and angular) therefor I decided to use mysql package without anything else. It is important to say that I have some complex queries and I didn't want to learn from sctratch how to make them work using one of the 9000 ORM node have, This is what I've been doing so far:</p>
  
  <p>thing.service.js</p>
  
  <pre><code>Thing.list = function (done) {
    db.query("SELECT * FROM thing...",function (err,data) {
      if (err) {
        done(err)
      } else {
        done(null,data);
      }
    });
  };
  module.exports = Thing;
  </code></pre>
  
  <p>thing.controler.js</p>
  
  <pre><code>Thing = require('thing.service.js');
  Thing.list(function (err,data) {
    if (err) {
      res.status(500).send('Error D:');
    } else {
      res.json(data);
    }
  });
  </code></pre>
  
  <p>how can I promisify this kind of functions using bluebird ? I've already tried but .... here I am asking for help. This is what I tried</p>
  
  <pre><code>var Thing = Promise.promisifyAll(require('./models/thing.service.js'));
  
  Thing.list().then(function(){})
  </code></pre>