cowiz20/server.py

28 lines
598 B
Python
Executable File

#!/usr/bin/env python3
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=args.port, address=args.bindaddr)
exit(0)
if __name__ == '__main__':
main()