Files
nl-pms-api/config.example.yaml
2026-08-15 07:41:11 +08:00

16 lines
825 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# nl-pms-api 配置示例:复制为 config.yaml 后按环境修改。
# env 仅 dev 会在启动时自动迁移表结构AutoMigrate
# prod 绝不执行任何 DDL缺表直接退出 —— 部署前先手工执行 init.sql。
env: prod
listen: ":8788"
# 拼接文件访问 URL 的前缀,必须是客户端可达的地址(如 http://192.168.1.10:8788
# 留空则按每次请求的 Host 推断。
base_url: ""
# 客户端上传密钥view 管理员在「文件存储」配置里填同一个值Authorization: Bearer <api_key>)。
api_key: "change-me"
storage_dir: "./uploads"
max_upload_mb: 20
mysql:
# 与 view 同步服务共用 code_count 库;账号需要对 pms_files 表的 SELECT/INSERT 权限。
dsn: "root:root@tcp(127.0.0.1:3306)/code_count?charset=utf8mb4&parseTime=false&loc=Local"