Created
February 19, 2014 17:30
-
-
Save nlf/9096971 to your computer and use it in GitHub Desktop.
This file contains 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
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