douyinWEB/backend/run_desktop_api.py
eric 1112a4d055 Handle YouTube Video Uploads daily quota (429) with project budget and pause-until-reset.
Add shorts_yt_quota module, Shorts UI quota banner, overview tweaks (hide upcoming opens, align events panel height), Electron desktop client scaffold, and deploy scripts; update README.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 02:04:44 -05:00

30 lines
641 B
Python

# -*- coding: utf-8 -*-
"""Desktop API entry — set Windows Selector loop BEFORE uvicorn creates the loop."""
from __future__ import annotations
import asyncio
import os
import sys
def main() -> None:
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
import uvicorn
host = os.environ.get("DY_API_HOST", "127.0.0.1")
port = int(os.environ.get("DY_API_PORT", "8014"))
uvicorn.run(
"app.main:app",
host=host,
port=port,
loop="asyncio",
http="h11",
log_level="info",
)
if __name__ == "__main__":
main()