feat: initialize flask app skeleton
This commit is contained in:
@@ -70,3 +70,12 @@
|
||||
- 阻塞:无。
|
||||
- 决策:运行日志写入 `logs/`,每天一个综合日志文件,包含多级别摘要日志,保留 1 年;每个 API 请求在 `archives/` 写入一个完整原始 JSON 归档文件,包含 `api` 和 `chis` 请求 / 响应数组,archive 不脱敏,仅用于内网前置机本地受控排查;`logs/` 和 `archives/` 不提交 git。
|
||||
- 下一步:T-001 初始化 Flask 项目骨架。
|
||||
|
||||
## 2026-07-04 T-001 初始化 Flask 项目骨架
|
||||
|
||||
- 状态:DONE
|
||||
- 变更:新增 `requirements.txt`、`run.py`、`app/__init__.py`、`app/config.py`、`app/api/__init__.py`、`app/api/health.py`、`tests/test_app_factory.py`;更新任务状态、技术栈命令和当前状态。
|
||||
- 验证:先执行 `python -m unittest discover -s tests` 看到 `ModuleNotFoundError: No module named 'app'`;实现后执行 `python -m pip install -r requirements.txt` 成功,执行 `python -m unittest discover -s tests` 结果 `Ran 1 test ... OK`,临时启动 `python run.py` 后用 `curl.exe --noproxy "*" -s http://127.0.0.1:5000/health` 返回 `{"ok":true}`。
|
||||
- 阻塞:无。
|
||||
- 决策:T-001 采用标准库 `unittest` 做最小 factory / health check 验证;后续 T-003 再建立 pytest 测试框架。
|
||||
- 下一步:T-002 建立基础配置与目录。
|
||||
|
||||
Reference in New Issue
Block a user