Skip to content

Commit

Permalink
Add yaml config
Browse files Browse the repository at this point in the history
  • Loading branch information
1357310795 committed Aug 7, 2022
1 parent 509d765 commit 12cf7a0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function getTipSidebar() {
'',
'JboxShared',
'JboxPublic',
'Config'
]
}]
};
36 changes: 36 additions & 0 deletions docs/tip/Config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: 使用 YAML 配置文件
lang: zh-CN
---

::: tip 说明
此功能只对控制台应用有效
:::

## 使用 YAML 配置文件初始化设置
1. 新建一个 `.yml` 文件,输入以下内容,并调整设置。

```yaml
# 监听地址,默认http://127.0.0.1:65472/
address: http://127.0.0.1:65472/

# 是否启用“交大空间”
isPublicEnabled: true

# 是否启用“他人的分享链接”
isSharedEnabled: false

# 访问模式:
# Full 完全模式
# ReadOnly 只读模式
# ReadWrite 读写模式
# NoDelete 防止删除模式
accessMode: Full
```
2. 使用参数启动程序
```bash
./JboxWebdav.ConsoleApp -c config.yml
```

3. 看到“配置文件读取成功!”字样则成功,否则请按提示检查。

0 comments on commit 12cf7a0

Please sign in to comment.