Skip to content

Instantly share code, notes, and snippets.

@edwin-bluekite
Last active August 29, 2015 14:07
Show Gist options
  • Save edwin-bluekite/dbb2967cd1745d808a52 to your computer and use it in GitHub Desktop.
Save edwin-bluekite/dbb2967cd1745d808a52 to your computer and use it in GitHub Desktop.
Simple hapi post server
var Hapi = require('hapi');
// Create a server with a host and port
var server = new Hapi.Server('localhost', 8000);
// Add the route
server.route({
method: 'POST',
path: '/notification',
handler: function (request, reply) {
reply('notification fired');
}
});
// Start the server
server.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment