Skip to content

Instantly share code, notes, and snippets.

@palmerabollo
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save palmerabollo/c7cc42a97edbe71bfb68 to your computer and use it in GitHub Desktop.

Select an option

Save palmerabollo/c7cc42a97edbe71bfb68 to your computer and use it in GitHub Desktop.
My first hook.io microservice
module['exports'] = function getExternalIp(hook) {
var store = hook.datastore;
store.get('externalip', function(err, result) {
if (err) {
return res.end(err.message);
}
hook.res.write(JSON.stringify(result));
hook.res.end();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment