Ver código fonte

📝 docs(config): update default API port from 3000 to 8080 in documentation

- 修改API基础URL配置,将默认端口从3000统一更新为8080
- 更新Swagger文档中的服务器地址配置
- 调整开发环境变量示例中的API地址
- 修改测试工具中的基础URL配置

🔧 chore(settings): add additional allowed bash commands

- 新增允许执行的命令:
  - npx typeorm migration:generate:* - 数据库迁移生成命令
  - pnpm db:seed - 数据库种子数据命令
  - curl:* - HTTP请求命令
yourname 4 meses atrás
pai
commit
cc536361dd

+ 5 - 2
.claude/settings.local.json

@@ -36,9 +36,12 @@
       "Bash(mkdir:*)",
       "Bash(xargs sed:*)",
       "Bash(git diff:*)",
-      "Bash(tree:*)"
+      "Bash(tree:*)",
+      "Bash(npx typeorm migration:generate:*)",
+      "Bash(pnpm db:seed)",
+      "Bash(curl:*)"
     ],
     "deny": [],
     "ask": []
   }
-}
+}

+ 1 - 1
.roo/commands/mini-rpc-小程序RPC开发规范.md

@@ -16,7 +16,7 @@ description: "小程序RPC客户端开发规范 - 基于Taro + Hono RPC的完整
 
 ```typescript
 // 环境配置
-const API_BASE_URL = process.env.TARO_APP_API_BASE_URL || 'http://localhost:3000'
+const API_BASE_URL = process.env.TARO_APP_API_BASE_URL || 'http://localhost:8080'
 
 // 自定义fetch适配Taro.request
 const taroFetch: any = async (input, init) => {

+ 2 - 2
docs/architecture.md

@@ -676,7 +676,7 @@ info:
   version: 1.0.0
   description: D8D Starter项目RESTful API文档
 servers:
-  - url: http://localhost:3000/api/v1
+  - url: http://localhost:8080/api/v1
     description: 本地开发环境
   - url: https://api.example.com/api/v1
     description: 生产环境
@@ -890,7 +890,7 @@ pnpm db:reset                  # 重置数据库
 **环境配置**:
 ```bash
 # 前端环境变量 (Vite)
-VITE_API_BASE_URL=http://localhost:3000/api
+VITE_API_BASE_URL=http://localhost:8080/api
 
 # 后端环境变量
 DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres

+ 1 - 1
docs/architecture/admin-dashboard-standards.md

@@ -500,7 +500,7 @@ src/client/admin/
 ### 环境变量
 ```bash
 # 前端环境变量
-VITE_API_BASE_URL=http://localhost:3000/api
+VITE_API_BASE_URL=http://localhost:8080/api
 VITE_APP_NAME=管理后台
 ```
 

+ 1 - 1
docs/architecture/api-design-integration.md

@@ -18,7 +18,7 @@ info:
   version: 1.0.0
   description: 出行服务项目RESTful API文档 - 基于MVP需求
 servers:
-  - url: http://localhost:3000/api/v1
+  - url: http://localhost:8080/api/v1
     description: 本地开发环境
   - url: https://api.example.com/api/v1
     description: 生产环境

+ 1 - 1
docs/architecture/development-workflow.md

@@ -42,7 +42,7 @@ pnpm db:reset                  # 重置数据库
 ## 环境配置
 ```bash
 # 前端环境变量 (Vite)
-VITE_API_BASE_URL=http://localhost:3000/api
+VITE_API_BASE_URL=http://localhost:8080/api
 
 # 后端环境变量
 DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres

+ 1 - 1
docs/development.md

@@ -70,7 +70,7 @@ JWT_SECRET=your-super-secret-jwt-key-change-in-production
 JWT_EXPIRES_IN=7d
 
 # 前端配置
-VITE_API_BASE_URL=http://localhost:3000
+VITE_API_BASE_URL=http://localhost:8080
 VITE_APP_NAME=D8D Starter
 
 # 文件存储 (MinIO)

+ 2 - 2
mini/README.md

@@ -55,7 +55,7 @@ pnpm install
 编辑 `.env.development` 和 `.env.production` 文件,设置API地址:
 
 ```bash
-API_BASE_URL=http://localhost:3000
+API_BASE_URL=http://localhost:8080
 API_VERSION=v1
 ```
 
@@ -153,7 +153,7 @@ const updated = await userClient[':id'].$put({
 ## 环境配置
 
 ### 开发环境
-- API地址: `http://localhost:3000`
+- API地址: `http://localhost:8080`
 - 环境变量文件: `.env.development`
 
 ### 生产环境

+ 1 - 1
mini/src/utils/rpc-client.ts

@@ -4,7 +4,7 @@ import { hc } from 'hono/client'
 import ResponsePolyfill from './response-polyfill'
 
 // API配置
-const API_BASE_URL = process.env.TARO_APP_API_BASE_URL || 'http://localhost:3000'
+const API_BASE_URL = process.env.TARO_APP_API_BASE_URL || 'http://localhost:8080'
 
 // 完整的API地址
 // const BASE_URL = `${API_BASE_URL}/api/${API_VERSION}`

+ 1 - 1
tests/utils/test-utils.ts

@@ -17,7 +17,7 @@ export function createTestServer(app: OpenAPIHono | Hono) {
   };
 
   async function makeRequest(method: string, path: string, body?: any) {
-    const url = new URL(path, 'http://localhost:3000');
+    const url = new URL(path, 'http://localhost:8080');
 
     const request = new Request(url.toString(), {
       method,