Skip to content

Instantly share code, notes, and snippets.

@nlf
Created February 19, 2014 17:30
Show Gist options
  • Save nlf/9096971 to your computer and use it in GitHub Desktop.
Save nlf/9096971 to your computer and use it in GitHub Desktop.
var Hapi = require('hapi');
var client = require('riakpbc').createClient();
var server = new Hapi.Server('127.0.0.1', 3000);
server.route({
method: 'GET',
path: '/',
handler: function (request, reply) {
client.get({ bucket: 'test', key: 'test' }, function () {
throw 'BOOM';
reply('hi');
});
}
});
server.start(function () {
console.log('Server running at:', server.info.uri);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment