build-tools/script/deploy-utils.js
async function connectToServer(client, config) {
  return new Promise((resolve, reject) => {
    client
      .on('ready', error => (error ? reject(error) : resolve(client)))
      .on('error', error => reject(error))
      .connect(config);
  });
}
async function connectToServer(client, config) {
  return new Promise((resolve, reject) => {
    client
      .on('ready', error => (error ? reject(error) : resolve(client)))
      .on('error', error => reject(error))
      .connect(config);
  });
}
async function connectToServer ( client , config ) { return new Promise ( ( resolve , reject ) => { client . on ( 'ready' , error => ( error ? reject ( error ) : resolve ( client ) ) ) . on ( 'error' , error => reject ( error ) ) . connect ( config ) ; } ) ; }
Create a connection to the server
@returns {Promise<*>}
Create a connection to the server