lib/expressify.js
function expressify(fn, ignis) {
  var status = arguments.length <= 2 || arguments[2] === undefined ? 200 : arguments[2];

  /* Otherwise, unpromisify */
  return function (req, res, next) {
    return _bluebird2['default']['try'](function () {
      return fn(ignis, req);
    }).then(function (data) {
      res.status(status).send(data);next();
    })['catch'](next);
  };
}
function expressify(fn, ignis) {
  var status = arguments.length <= 2 || arguments[2] === undefined ? 200 : arguments[2];

  /* Otherwise, unpromisify */
  return function (req, res, next) {
    return _bluebird2['default']['try'](function () {
      return fn(ignis, req);
    }).then(function (data) {
      res.status(status).send(data);next();
    })['catch'](next);
  };
}
expressify(2)

@description                Wraps a promise-producing function into an
express middleware that responds with the promise
results if resolved; invokes error handler stack
if rejected.
@param          {fn}        Promise-producing handler function.
@param          {status}    Status code to return on success (default: 200).