Skip to content

Commit

Permalink
补丁,修正runconfig,v0.1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Shua-github committed Jan 23, 2025
1 parent a66f2bb commit 6f8dbb3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
3. 运行`app.exe`

### 其它
1. 环境:理论`Python`>=3.7以上均可(推荐使用3.12)
1. 环境:理论`Python`>=`3.7`均可(推荐使用`3.12`)
2. 拉取本项目```git clone https://github.com/Shua-github/JMComic-API-Python.git```
3. 运行`venv_config.sh`
4. 执行`python app.py`

## 配置
网络在`RunConfig.yml`,核心在`CoreConfig.yml`
## 默认配置
`网络配置``核心配置路径``RunConfig.yml`,`核心配置``CoreConfig.yml`

## 使用
访问`IP:端口/docs`查看`FastAPI`自带的文档(默认端口是`5000`)
访问`主机:端口/docs`查看`FastAPI`自带的文档(默认端口是`5000`)

## 谢谢他们和它们
- [JMComic-Crawler-Python](https://github.com/hect0x7/JMComic-Crawler-Python)
Expand Down
2 changes: 1 addition & 1 deletion RunConfig.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
net:
host: "0.0.0.0"
port: 5000
core_config_path: "CoreConfig.yml"
core_config_path: "CoreConfig.yml"
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def from_dict(cls, config_dict:dict):
server_config:dict = config_dict.get('net')
host = server_config.get('host')
port = server_config.get('port')
core_path = server_config.get('core_config_path')
core_path = config_dict.get('core_config_path')
return cls(host, port, core_path)

# 读取 YAML 配置文件并返回 Config 实例
Expand Down

0 comments on commit 6f8dbb3

Please sign in to comment.