run static method

Future<APIServer> run(
  1. APIRoot apiRoot,
  2. List<String> args, {
  3. int argsOffset = 0,
  4. bool verbose = false,
})

Runs apiRoot and returns the APIServer.

Implementation

static Future<APIServer> run(APIRoot apiRoot, List<String> args,
    {int argsOffset = 0, bool verbose = false}) async {
  var apiServer = create(apiRoot, args, argsOffset);

  await apiServer.start();

  if (verbose) {
    print('\nRunning: $apiServer\n');
    print('${apiRoot.apiConfig}\n');
    print('URL: ${apiServer.apiInfoURL}\n');
  }

  return apiServer;
}