diff --git a/server.py b/server.py index 595f445..a1db440 100755 --- a/server.py +++ b/server.py @@ -4,16 +4,22 @@ import random from app_instance import api from routes import * import wiz_game +import argparse def main(): print("main started") + parser = argparse.ArgumentParser() + parser.add_argument('--port', metavar='port', default=8001, type=int, help='the port to bind to') + parser.add_argument('--bindaddr', metavar='addr', default='127.0.0.1', help='the address to bind to') + + args = parser.parse_args() + random.seed() wiz_game.the_game.start_game() - api.run(port=8001, address="127.0.0.1") - #api.run(port=8001, address="192.168.42.100") + api.run(port=args.port, address=args.bindaddr) exit(0) diff --git a/templates/shared/_layout.html b/templates/shared/_layout.html index 2c64aa7..6f36239 100644 --- a/templates/shared/_layout.html +++ b/templates/shared/_layout.html @@ -23,7 +23,13 @@