added the api
Some checks failed
Deploy API / deploy (push) Failing after 3s

This commit is contained in:
Your Name 2026-05-19 17:56:12 -04:00
parent f5305c10d8
commit 30999a2cb2
11 changed files with 2486 additions and 0 deletions

28
clio-api/config.py Normal file
View file

@ -0,0 +1,28 @@
import os
from pathlib import Path
# Server configuration
HOST = os.getenv("HOST", "0.0.0.0")
PORT = int(os.getenv("PORT", "8000"))
# Storage configuration
BASE_DIR = Path(os.getenv("BASE_DIR", os.path.dirname(os.path.abspath(__file__))))
RECORDINGS_DIR = Path(os.getenv("RECORDINGS_DIR", str(BASE_DIR / "recordings")))
KEYS_DIR = Path(os.getenv("KEYS_DIR", str(BASE_DIR / "keys")))
# Database
DATABASE_PATH = Path(os.getenv("DATABASE_PATH", str(BASE_DIR / "recordings.db")))
# API Key for upload authentication (optional but recommended)
API_KEY = os.getenv("API_KEY", "")
# Audio serving - can point to external drive or different location
AUDIO_BASE_PATH = Path(os.getenv("AUDIO_BASE_PATH", str(RECORDINGS_DIR)))
# Key files
PRIVATE_KEY_FILE = KEYS_DIR / "private.key"
PUBLIC_KEY_FILE = KEYS_DIR / "public.key"
# Ensure directories exist
RECORDINGS_DIR.mkdir(parents=True, exist_ok=True)
KEYS_DIR.mkdir(parents=True, exist_ok=True)