Преглед на файлове

【文档】更新配置文件使用说明

- 明确配置文件在传递时才会覆盖默认配置
- 在启动命令中添加配置文件参数
- 更新中英文 README 文件
PJ568 преди 1 година
родител
ревизия
86d7a7c53e
променени са 4 файла, в които са добавени 8 реда и са изтрити 8 реда
  1. 1 1
      Cargo.lock
  2. 1 1
      Cargo.toml
  3. 4 4
      README.en.md
  4. 2 2
      README.md

+ 1 - 1
Cargo.lock

@@ -2449,7 +2449,7 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
 
 [[package]]
 name = "yaa"
-version = "2.14.2"
+version = "2.14.3"
 dependencies = [
  "actix-cors",
  "actix-web",

+ 1 - 1
Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "yaa"
-version = "2.14.2"
+version = "2.14.3"
 edition = "2024"
 
 [dependencies]

+ 4 - 4
README.en.md

@@ -32,9 +32,9 @@ cd yaa
 Configuration:
 
 ```bash
-# Create client config file (will override default config)
+# Create client config file (will override default config when passed)
 cp configs/Config.example.json Config.json
-# Create server config file (will override default config)
+# Create server config file (will override default config when passed)
 cp configs/ServerConfig.example.json ServerConfig.json
 ```
 
@@ -43,13 +43,13 @@ cp configs/ServerConfig.example.json ServerConfig.json
 Start in server mode:
 
 ```bash
-cargo run --release -- --serve --port 12345
+cargo run --release -- --serve --port 12345 --config Config.json
 ```
 
 Start in interactive CLI mode:
 
 ```bash
-cargo run --release
+cargo run --release -- --config Config.json
 > Please write a bubble sort algorithm in Python.
 * Working on it...
 ```

+ 2 - 2
README.md

@@ -43,13 +43,13 @@ cp configs/ServerConfig.example.json ServerConfig.json
 以服务模式启动:
 
 ```bash
-cargo run --release -- --serve --port 12345
+cargo run --release -- --serve --port 12345 --config Config.json
 ```
 
 以命令行交互模式启动:
 
 ```bash
-cargo run --release
+cargo run --release -- --config Config.json
 > 请用 Python 写一个冒泡排序算法。
 * 好的……
 ```