- Replace RSA key exchange with SRP (Secure Remote Password) - Password never transmitted over network - Add unit tests for endpoints - Fix datetime.UTC compatibility for Python < 3.11 - Fix logger.exception usage - Update README with new auth flow diagram
22 lines
455 B
Python
22 lines
455 B
Python
from typing import Optional
|
|
from .logger import logger
|
|
from .factory import create_app
|
|
|
|
|
|
def run_server(
|
|
host: str = "0.0.0.0",
|
|
port: int = 8000,
|
|
password: Optional[str] = None,
|
|
workers: int = 1,
|
|
) -> None:
|
|
app = create_app(password=password or "")
|
|
logger.info(f"Starting server on {host}:{port}")
|
|
|
|
app.run(
|
|
host=host,
|
|
port=port,
|
|
single_process=True,
|
|
debug=False,
|
|
access_log=True,
|
|
)
|