diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2024-11-15 12:17:33 +0100 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2024-11-15 12:17:33 +0100 |
| commit | b3b42cc1b83beada92f38004a9d3febd2f69d615 (patch) | |
| tree | 11dfbc29cba9199ad9db32de6a2a4de8f749f237 | |
| parent | 100670e1d0b374e3c495407e55f4660cba62a0f6 (diff) | |
Changed to the HTTP port
| -rw-r--r-- | pyproject.toml | 2 | ||||
| -rw-r--r-- | src/match_up/__init__.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/pyproject.toml b/pyproject.toml index 087f689..e547e3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "match_up" dynamic = ["version"] -dependencies = ["flask", "pandas", "sqlalchemy", "names"] +dependencies = ["flask", "waitress", "pandas", "sqlalchemy", "names"] authors = [ { name="Karan Jayachandra", email="mail@karanjayachandra.com" }, ] diff --git a/src/match_up/__init__.py b/src/match_up/__init__.py index 61a8416..25b4d73 100644 --- a/src/match_up/__init__.py +++ b/src/match_up/__init__.py @@ -1,10 +1,12 @@ from flask import Flask +from waitress import serve from argparse import ArgumentParser from importlib.resources import path from match_up.utilities import Timer from match_up.controller import RoundGenerator from match_up.model import CourtList, PlayerList + with path("match_up", "static") as p: static_folder = p with path("match_up", "templates") as p: @@ -28,4 +30,4 @@ def main(): rg.courts = CourtList(total=args.courts) rg.timer = Timer(max_mins=args.timer) rg.players = PlayerList(csv_location=args.database) - app.run() + serve(app, port=80) |
