diff --git a/magneticow/magneticow/__main__.py b/magneticow/magneticow/__main__.py index 3559058..dd0f777 100644 --- a/magneticow/magneticow/__main__.py +++ b/magneticow/magneticow/__main__.py @@ -29,7 +29,7 @@ def main() -> int: arguments = parse_args() magneticow.app.arguments = arguments - http_server = gevent.wsgi.WSGIServer(("", arguments.port), magneticow.app) + http_server = gevent.wsgi.WSGIServer((arguments.host, arguments.port), magneticow.app) magneticow.initialize_magneticod_db() @@ -67,6 +67,10 @@ def parse_args() -> argparse.Namespace: allow_abbrev=False, formatter_class=argparse.RawDescriptionHelpFormatter ) + parser.add_argument( + "--host", action="store", type=str, required=False, default="", + help="the host address magneticow web server should listen on" + ) parser.add_argument( "--port", action="store", type=int, required=True, help="the port number magneticow web server should listen on"