anchor.diff:          "Could not locate the SDK; "
           "please start the server with the '--dart-sdk' option.");
       exit(1);
  +  }
  +
  +  if (result['discovery']) {
  +    var serverUrl = result['server-url'];
  +    EndpointsServer.generateDiscovery(sdkDir.path, serverUrl).then((doc) {
  +      print(doc);
  +      exit(0);
  +    });
  +    return;
     }
   
     Logger.root.onRecord.listen((r) => print(r));
  
positive.code:       endpointsServer.server = server;
        return endpointsServer;
      });
    }
  
    final int port;
  
negative.code:   var parser = new ArgParser();
    parser.addOption('port', abbr: 'p', defaultsTo: '8080');
    parser.addOption('dart-sdk');
    parser.addFlag('discovery');
    parser.addOption('server-url', defaultsTo: 'http://localhost');
  
    var result = parser.parse(args);
    var port = int.parse(result['port'], onError: (val) {
  