packages/react-qml-cli/src/commands/reload.js
async function reload() {
  const requestOptions = {
    hostname: 'localhost',
    port: 8081,
    path: '/reloadapp',
    method: 'HEAD',
  };

  const req = http.request(requestOptions, () => {
    clear();
    logger.done('Sent reload request');
    req.end();
  });

  req.on('error', e => {
    clear();
    const error = e.toString();
    if (error.includes('connect ECONNREFUSED')) {
      logger.error(`Reload request failed. Make sure Haul is up.`);
    } else {
      logger.error(e);
    }
  });

  req.end();
}
async function reload() {
  const requestOptions = {
    hostname: 'localhost',
    port: 8081,
    path: '/reloadapp',
    method: 'HEAD',
  };

  const req = http.request(requestOptions, () => {
    clear();
    logger.done('Sent reload request');
    req.end();
  });

  req.on('error', e => {
    clear();
    const error = e.toString();
    if (error.includes('connect ECONNREFUSED')) {
      logger.error(`Reload request failed. Make sure Haul is up.`);
    } else {
      logger.error(e);
    }
  });

  req.end();
}
async function reload ( ) { const requestOptions = { hostname : 'localhost' , port : 8081 , path : '/reloadapp' , method : 'HEAD' , } ; const req = http . request ( requestOptions , ( ) => { clear ( ) ; logger . done ( 'Sent reload request' ) ; req . end ( ) ; } ) ; req . on ( 'error' , e => { clear ( ) ; const error = e . toString ( ) ; if ( error . includes ( 'connect ECONNREFUSED' ) ) { logger . error ( ` ` ) ; } else { logger . error ( e ) ; } } ) ; req . end ( ) ; }
Send reload request to devices
Send reload request to devices