初始化
This commit is contained in:
15
config.example.yaml
Normal file
15
config.example.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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"
|
||||
Reference in New Issue
Block a user