api-testing/console/atest-desktop/api.js

17 lines
368 B
JavaScript

exports.control = function(okCallback, errorCallback) {
fetch('http://localhost:' + getPort() + '/healthz').
then(okCallback).catch(errorCallback)
}
function getPort() {
// TODO support set this value
return 7788
}
function getHomePage() {
return 'http://localhost:' + getPort()
}
exports.getPort = getPort
exports.getHomePage = getHomePage