code: public Yoke deploy(final @NotNull JsonArray config, final Handler<Object> handler) {
  
          if (config.size() == 0) {
              if (handler == null) {
                  return this;
              } else {
                  handler.handle(null);
                  return this;
              }
          }
  
          // wait for all deployments before calling the real handler
          Handler<AsyncResult<String>> waitFor = new Handler<AsyncResult<String>>() {
  
              private int latch = config.size();
              private boolean handled = false;
  
              @Override
              public void handle(AsyncResult<String> event) {
                  latch--;
                  if (handler != null) {
                      if (!handled && (event.failed() || latch == 0)) {
                          handled = true;
                          handler.handle(event.failed() ? event.cause() : null);
                      }
                  }
              }
          };
  
          for (Object o : config) {
              JsonObject json = (JsonObject) o;
              vertx.deployVerticle(json.getString("verticle"), new DeploymentOptions(json), waitFor);
          }
  
          return this;
      }
docs: Deploys required middleware from a config json element. The handler is only called once all middleware is
  deployed or in error. The order of deployment is not guaranteed since all deploy functions are called
  concurrently and do not wait for the previous result before deploying the next item.
  
  The current format for the config is either a single item or an array:
  <pre>
  {
  module: String, // the name of the module
  verticle: String, // the name of the verticle (either verticle or module must be present)
  instances: Number, // how many instances, default 1
  worker: Boolean, // is it a worker verticle? default false
  multiThreaded: Boolean, // is it a multiThreaded verticle? default false
  config: JsonObject // any config you need to pass to the module/verticle
  }
  </pre>
  
  @param config either a json object or a json array.
  @param handler A handler that is called once all middleware is deployed or on error.