Last active
August 29, 2015 14:27
-
-
Save palmerabollo/c7cc42a97edbe71bfb68 to your computer and use it in GitHub Desktop.
My first hook.io microservice
This file contains hidden or 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
| 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