code: def run(port, like, use_json, server):
      
      if not port and not server[0]:
          raise click.UsageError("Please specify a port")
  
      if server[0]:
          app.run(host=server[0], port=server[1])
          return
  
      ports = get_ports(port, like)
      if not ports:
          sys.stderr.write("No ports found for '{0}'\n".format(port))
          return
  
      if use_json:
          print(json.dumps(ports, indent=4))
      else:
          table = get_table(ports)
          print(table)
docs: Search port names and numbers.