- Author: Richard Wei
- Date: October 2018
This document is written for both the machine learning community and the Swift programming language design community, with a strong focus on language design.
This document is written for both the machine learning community and the Swift programming language design community, with a strong focus on language design.
var http = require('http'); | |
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'); | |
}); |