0.2.0 • Published 8 years ago

drboom-seaquell v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

Dr. Boom: Seaquell

npm i drboom-seaquell

Auto-cast errors from SeaQuell into Hapi HTTP Errors.

##Example / Boilerplate

Plugin registration boilerplate:

var hapi = require('hapi');
var config = require('./config.json');
var Boom = require('boom');
var Seaquell = require('seaquell');

var server = new hapi.Server();
server.connection(config);

server.register([{
    register: require('drboom'), 
    options: {
        plugins: [require('drboom-seaquell')({Seaquell: Seaquell, Boom: Boom})]
    },
}, function (err) {
    server.log(['startup'], 'Loaded pgboom plugin');
    server.start(function (err) {
        //...
    }
});

Now, you can pass your seaquell errors right on through to hapi reply!

function someHandler(request, reply) {
    SomeSeaquellModel.method(reply);
});
0.2.0

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago