Skip to content

Commit ad9c868

Browse files
authored
feat: 提供config.example.yml (#2)
* feat: 提供config.yml 的模板 * docs: 更新README.md 添加 config.yml 相关描述
1 parent a8a5db5 commit ad9c868

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ rop2-web的配套api。
1212
- 使用gorm的`Scan`时,若返回空结果(返回行数为0),不会修改提供的地址,因此如果是var声明的数组(没有make初始化),将保持nil
1313

1414
### 部署方式
15+
将 config.example.yml 复制一份并重命名为 config.yml,然后修改必要的参数
1516
确保cwd下恰包含compose.yml。请使用Docker Compose v2.20+
1617

1718
```sh

config.example.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Addr: "127.0.0.1:8080"
2+
DSN: "root:root@tcp(localhost:3306)/rop2?charset=utf8mb4&loc=Local&parseTime=true"
3+
MutipleChoicesRedirect: "http://localhost:5173/login/choice"
4+
LoginCallbackRegex: "^http://localhost:5173(/.*)?$"
5+
IdentityKey: "your-secret-key-here" # 请修改此密钥
6+
TokenRefreshAfter: "2m" # 2分钟
7+
TokenDuration: "24h" # 24小时
8+
CORSAllowOrigins:
9+
- "http://localhost:5173"
10+
MigrateDb: false

0 commit comments

Comments
 (0)