import uvicorn
import argparse

from api.main import app


# ? Helps pyinstaller for dependencies resolution
app

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Run the FastAPI server")
    parser.add_argument(
        "--port", type=int, required=True, help="Port number to run the server on"
    )
    args = parser.parse_args()

    uvicorn.run("api.main:app", host="127.0.0.1", port=args.port, log_level="info")
