selecta-highscore/highscore/app/served.py

20 lines
423 B
Python

import subprocess
import sys
from pathlib import Path
def serve() -> None:
"""Start the Daphne ASGI server on 0.0.0.0:8080."""
daphne_path = str(Path(sys.path[0]) / "daphne")
subprocess.run( # noqa: S603
[
daphne_path,
"-b",
"0.0.0.0", # noqa: S104
"-p",
"8080",
"app.routing:application",
],
check=True,
)