buildClient = function() {
const search = util.urlSearch();
const params = ['ssl', 'host', 'port', 'path', 'alert', 'key'].reduce(
(acc, v) => {
acc[v] = search.get(v);
return acc;
},
{}
);
const { ssl, host, port, path } = params;
if (!(host && port && path))
return 'Missing host or port or path in url params';
return b.buildClient({ server: { host, port, path } });
}