UNPKG

perst

Version:

perst is a wrapper around LoaderIO, which can be configured and run in your commandline multiple tests and validates the measureable values like AVG Response Time and AVG Error Rate.

24 lines (18 loc) 647 B
import Application from 'loader.io.api/src/Application/Application.js'; import logger from '../logger.js'; async function validateDomain(loaderIO, config) { const domain = new URL(config.app.domain); try { const applications = await loaderIO.applications.list(); const application = applications.find((application) => application.app === domain.host); if (application === undefined) { return false; } return application.status === Application.STATUS.VERIFIED; } catch (error) { logger.log(error); return false; } } export { validateDomain as default };