Spaces:
Sleeping
Sleeping
eithney
Refactor application to Flask: enhance structure with RESTful API, static file support, and logging. Update Dockerfile for production with Gunicorn and health checks. Expand requirements for Flask and OpenSearch integration.
b0a1454 | # 交互式英语学习应用 - Flask 重构版本 | |
| # Web 框架 | |
| Flask==3.0.0 | |
| Flask-CORS==4.0.0 | |
| # OpenSearch 客户端(根据项目内存:使用 opensearch-py 而不是 elasticsearch) | |
| opensearch-py==2.4.2 | |
| # 生产环境 WSGI 服务器 | |
| gunicorn==21.2.0 | |
| # 会话管理(可选,用于持久化会话) | |
| # Flask-Session==0.5.0 | |
| # redis==5.0.1 | |
| # 缓存支持(可选) | |
| # Flask-Caching==2.1.0 | |
| # API 限流(可选,防止滥用) | |
| # Flask-Limiter==3.5.0 | |
| # 数据库 ORM(可选,如需持久化学习进度) | |
| # Flask-SQLAlchemy==3.1.1 | |
| # pymysql==1.1.0 | |
| # 工具库 | |
| python-dotenv==1.0.0 # 环境变量管理 | |