Skip to content

Instantly share code, notes, and snippets.

@rhaseven7h
Last active August 29, 2015 14:26
Show Gist options
  • Save rhaseven7h/e4552231807b15236480 to your computer and use it in GitHub Desktop.
Save rhaseven7h/e4552231807b15236480 to your computer and use it in GitHub Desktop.
Hook.io Microservice to Interact with HKP Servers (PGP Key Server)
// A simple hello world microservice
// Click "Deploy Service" to deploy this code
// Service will respond to HTTP requests with a string
module['exports'] = function helloWorld (hook) {
// hook.req is a Node.js http.IncomingMessage
var host = hook.req.host;
// hook.res is a Node.js httpServer.ServerResponse
// Respond to the request with a simple string
hook.res.end(host + ' says, "Hello world, papanatas!"');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment