From d710e86e55351013001935852857075639be1f73 Mon Sep 17 00:00:00 2001 From: Wu Clan Date: Mon, 26 Jun 2023 18:28:39 +0800 Subject: [PATCH] Update the instructions in the readme (#159) --- README.md | 26 ++++++++++++++------------ README.zh-CN.md | 10 ++++++---- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 34579ffd..dd1b8403 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ it a pseudo three-tier architecture | workflow | java | fastapi_best_architecture | |-----------------|----------------|---------------------------| -| view | controller | api / view | +| view | controller | api | | data validation | dto | schema | | business logic | service + impl | service | | data access | dao / mapper | crud | @@ -27,16 +27,16 @@ it a pseudo three-tier architecture ## Features -- [x] FastAPI New Features +- [x] FastAPI new features - [x] Asynchronous design -- [x] RESTful API specification +- [x] Restful API specification - [x] SQLAlchemy 2.0 syntax -- [x] Pydantic Data Validation -- [x] Casbin RBAC Permission Control -- [x] APScheduler Timed Tasks -- [x] JWT Authentication -- [x] Redis Caching -- [x] Docker Deployment +- [x] Pydantic data validation +- [x] Casbin RBAC permission control +- [x] APScheduler timed tasks +- [x] JWT authentication +- [x] Redis caching +- [x] Docker deployment - [x] Pytest testing ## Getting started: @@ -48,7 +48,7 @@ it a pseudo three-tier architecture pip install -r requirements.txt ``` -2. Create a database ``fba``, choose utf8mb4 encoding +2. Create a database `fba`, choose utf8mb4 encoding 3. Install and start Redis 4. Create a `.env` file in the `backend/app/` directory @@ -76,7 +76,7 @@ it a pseudo three-tier architecture ``` 7. Execute the `backend/app/main.py` file to start the service -8. Browser access: http://127.0.0.1:8000/v1/docs +8. Browser access: http://127.0.0.1:8000/api/v1/docs --- @@ -86,6 +86,8 @@ it a pseudo three-tier architecture file ``.env`` ```shell + cd deploy/docker-compose/ + cp .env.server ../../backend/app/.env # This command is optional @@ -99,7 +101,7 @@ it a pseudo three-tier architecture ``` 3. Wait for the command to complete automatically -4. Visit the browser: http://127.0.0.1:8000/v1/docs +4. Visit the browser: http://127.0.0.1:8000/api/v1/docs ## Test data diff --git a/README.zh-CN.md b/README.zh-CN.md index b4e8c849..f521dd22 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -16,7 +16,7 @@ | 工作流程 | java | fastapi_best_architecture | |------|----------------|---------------------------| -| 视图 | controller | api / view | +| 视图 | controller | api | | 数据验证 | dto | schema | | 业务逻辑 | service + impl | service | | 数据访问 | dao / mapper | crud | @@ -26,7 +26,7 @@ - [x] FastAPI 新特性 - [x] 异步设计 -- [x] RESTful API 规范 +- [x] Restful API 规范 - [x] SQLAlchemy 2.0 语法 - [x] Pydantic 数据验证 - [x] Casbin RBAC 权限控制 @@ -73,7 +73,7 @@ ``` 7. 执行 `backend/app/main.py` 文件启动服务 -8. 浏览器访问:http://127.0.0.1:8000/v1/docs +8. 浏览器访问:http://127.0.0.1:8000/api/v1/docs --- @@ -82,6 +82,8 @@ 1. 进入 `docker-compose.yml` 文件所在目录,创建环境变量文件`.env` ```shell + cd deploy/docker-compose/ + cp .env.server ../../backend/app/.env # 此命令为可选 @@ -95,7 +97,7 @@ ``` 3. 等待命令自动完成 -4. 浏览器访问:http://127.0.0.1:8000/v1/docs +4. 浏览器访问:http://127.0.0.1:8000/api/v1/docs ## 测试数据