Created
August 7, 2017 01:06
-
-
Save insanity54/c98dc8c01752c6e7cdf04535c946cf00 to your computer and use it in GitHub Desktop.
lolguide-server
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 lolSummoner(hook) { | |
hook.res.json(hook.params); | |
http.get('https://na1.api.riotgames.com/lol/summoner/v3/summoners/by-name/'+hook.params.name, function(res) { | |
hook.debug(hook.params.name + " is the summoner name requested" + res.body); | |
hook.res.end(res.body); | |
}).on('error', function(e) { | |
hook.debug(e); | |
hook.res.end(e); | |
}); | |
}; | |
/** | |
module['exports'] = function isTheWebSiteDown (hook) { | |
http.get(hook.params.url, function(res){ | |
hook.debug(hook.params.url + " is up and running.") | |
hook.res.end('false'); | |
}).on('error', function (){ | |
hook.debug(hook.params.url + " is DOWN!") | |
hook.res.end('true'); | |
}); | |
}; | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment