Docs: usage

pull/3/head
zijiren233 1 year ago
parent 8698a2359f
commit 1b1856f361

@ -28,7 +28,7 @@ jobs:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
- name: Build
run: |

@ -14,6 +14,8 @@
</div>
</div>
---
[English](./README.md) | 中文
# 特点
@ -27,6 +29,52 @@
- [ ] 视频代理
- [ ] 直播代理
---
# 用法
## 全局标志:
```
-f, --config string config file path
--dev start with dev mode
--env-no-prefix env no SYNCTV_ prefix
--log-std log to std (default true)
--skip-config skip config
--skip-env skip env
```
如果你想使用自定义配置文件,你可以使用 `-f` 标志,否则它将使用 `$home/.config/synctv/config.yaml`
## Init
`synctv init` 来初始化配置文件
```bash
synctv init
# or
synctv init -f ./config.yaml
```
## Server
`synctv server` 启动服务器
```bash
synctv server
# or
synctv server -f ./config.yaml
```
服务器默认侦听`127.0.0.1:8080`,您可以在配置文件中更改它
示例:
```yaml
server:
listen: 0.0.0.0 # server listen addr
port: 8080 # server listen port
```
---
# 贡献者
感谢这些出色的人们:

@ -13,7 +13,7 @@
</a>
</div>
</div>
<!-- https://github.com/synctv-org/synctv/actions?query=workflow%3Abuild -->
---
English | [中文](./README-CN.md)
@ -29,6 +29,52 @@ English | [中文](./README-CN.md)
- [ ] Videos proxy
- [ ] Live proxy
---
# Usage
## Global Flags:
```
-f, --config string config file path
--dev start with dev mode
--env-no-prefix env no SYNCTV_ prefix
--log-std log to std (default true)
--skip-config skip config
--skip-env skip env
```
if you want to use a custom config file, you can use `-f` flag, else it will use `$home/.config/synctv/config.yaml`
## Init
`synctv init` to init config file
```bash
synctv init
# or
synctv init -f ./config.yaml
```
## Server
`synctv server` to start the server
```bash
synctv server
# or
synctv server -f ./config.yaml
```
server default listen on `127.0.0.1:8080`, you can change it in config file
example:
```yaml
server:
listen: 0.0.0.0 # server listen addr
port: 8080 # server listen port
```
---
# Contributors
Thanks goes to these wonderful people:

Loading…
Cancel
Save