code: func listen(ws *webserver.Server, config *serverinit.Config) (baseURL string, err error) {
  	camliNetIP := config.CamliNetIP()
  	if camliNetIP != "" {
  		return listenForCamliNet(ws, config)
  	}
  
  	baseURL = config.BaseURL()
  
  	// Prefer the --listen flag value. Otherwise use the config value.
  	listen := *flagListen
  	if listen == "" {
  		listen = config.ListenAddr()
  	}
  	if listen == "" {
  		exitf("\"listen\" needs to be specified either in the config or on the command line")
  	}
  
  	hostname, err := certHostname(listen, baseURL)
  	if err != nil {
  		return "", fmt.Errorf("Bad baseURL or listen address: %v", err)
  	}
  	setupTLS(ws, config, hostname)
  
  	err = ws.Listen(listen)
  	if err != nil {
  		return "", fmt.Errorf("Listen: %v", err)
  	}
  	if baseURL == "" {
  		baseURL = ws.ListenURL()
  	}
  	return baseURL, nil
  }
docs: // listen discovers the listen address, base URL, and hostname that the ws is
  // going to use, sets up the TLS configuration, and starts listening.
  //
  // If camliNetIP is configured, it also prepares for the GPG
  // challenge, to register/acquire a name in the camlistore.net domain.