def main(argv=sys.argv): """Entry point for starting a TCP git server.""" if len(argv) > 1: gitdir = argv[1] else: gitdir = '.' log_utils.default_logging_config() backend = DictBackend({'/': Repo(gitdir)}) server = TCPGitServer(backend, 'localhost') server.serve_forever()
def main(argv=sys.argv): """Entry point for starting an HTTP git server.""" if len(argv) > 1: gitdir = argv[1] else: gitdir = os.getcwd() # TODO: allow serving on other addresses/ports via command-line flag listen_addr='' port = 8000 log_utils.default_logging_config() backend = DictBackend({'/': Repo(gitdir)}) app = HTTPGitApplication(backend) server = make_server(listen_addr, port, app, handler_class=HTTPGitRequestHandler) logger.info('Listening for HTTP connections on %s:%d', listen_addr, port) server.serve_forever()
def main(argv=sys.argv): """Entry point for starting an HTTP git server.""" if len(argv) > 1: gitdir = argv[1] else: gitdir = os.getcwd() # TODO: allow serving on other addresses/ports via command-line flag listen_addr = '' port = 8000 log_utils.default_logging_config() backend = DictBackend({'/': Repo(gitdir)}) app = HTTPGitApplication(backend) server = make_server(listen_addr, port, app, handler_class=HTTPGitRequestHandler) logger.info('Listening for HTTP connections on %s:%d', listen_addr, port) server.serve_forever()