def cli(config_uri, server): """configuring web interface""" cfg = Config(config_uri) try: cfg.load() except ConfigError as e: click.echo("error: %s" % str(e)) return 2 setup_logging_from_cfg(cfg) application = make_wsgi_app_from_cfg(cfg) if server == "waitress": run_server_waitress(application, { "host": cfg.web_host, "port": cfg.web_port, }) elif server == "gunicorn": run_server_gunicorn(application, {})