完成基础开发

This commit is contained in:
2025-07-18 15:46:07 +08:00
parent 99f30bd1eb
commit cff16ef2af
42 changed files with 7290 additions and 0 deletions

20
backend/config.py Normal file
View File

@ -0,0 +1,20 @@
import os
from dotenv import load_dotenv
# 加载环境变量
load_dotenv()
class Config:
"""应用配置类"""
SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key-change-in-production'
# 应用配置
APP_HOST = os.environ.get('APP_HOST', '0.0.0.0')
APP_PORT = int(os.environ.get('APP_PORT', 8888))
DEBUG = os.environ.get('DEBUG', 'True').lower() == 'true'
# 客户端配置文件路径
CLIENTS_CONFIG_PATH = os.environ.get('CLIENTS_CONFIG_PATH', 'data/clients.json')
# CORS 配置
CORS_ORIGINS = ['http://localhost:3000', 'http://127.0.0.1:3000']