Created
April 12, 2015 23:48
-
-
Save jstrimpel/f6ffada6116d57d9a494 to your computer and use it in GitHub Desktop.
set up hapi error listener
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['lazoServer'], function (LazoServer) { | |
'use strict'; | |
return LazoServer.extend({ | |
// register good with lazo server pack | |
// hapi - a reference to the hapi module itself | |
// pack - the lazo server pack | |
// servers - the servers that belong to the lazo pack | |
// options.success and options.error | |
setup: function (hapi, pack, servers, options) { | |
for (var k in servers) { | |
servers[k].on('internalError', function (request, err) { | |
console.log(err); | |
}); | |
} | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment