76
76
from loggerhead.config import LoggerheadConfig
77
77
from paste.httpexceptions import HTTPExceptionHandler
78
78
from paste.httpserver import serve
79
80
port = kw.get('port', DEFAULT_PORT)
80
81
# port might be an int already...
81
82
if isinstance(port, basestring) and ':' in port:
82
83
host, port = port.split(':')
85
argv = ['--host', host, '--port', str(port)]
86
argv = ['--host', host, '--port', str(port), path]
86
87
config = LoggerheadConfig(argv)
88
89
app = BranchesFromTransportRoot(transport, config)
89
90
app = HTTPExceptionHandler(app)
90
91
serve(app, host=host, port=port)