Skip to content

Commit 86d3545

Browse files
committed
Update readme.
1 parent e81ccbb commit 86d3545

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

readme.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A Mindustry mod to manage saves. Provides a variety of practical functions.
88

99
- Save editor
1010
- Multiplayer
11-
- Cloud save (need to build it yourself)
11+
- Cloud save (need to build or deploy it yourself)
1212

1313
# Cloud Save
1414
## protocol
@@ -52,7 +52,7 @@ Header:
5252

5353
- `key`: the key to access the server
5454

55-
Return:
55+
Return the limitations of the server (only include `maxPayloadSize` and `maxNameSize`), for example:
5656

5757
```json
5858
{
@@ -61,5 +61,15 @@ Return:
6161
}
6262
```
6363

64+
`maxPayloadSize`: max size of the save (byte).
65+
`maxNameSize`: max size of the save name (byte).
66+
6467
## deploy on cloudflare
65-
Use cloudflare's workers and kv to build a free server. The code needed is in `/cloud`. Fill in the subdomain you want to use, the server key you want to set and the ID of your kv in `wrangler.toml` then use cloudflare's `wrangler` to deploy it.
68+
Use cloudflare's workers and kv to build a free server. The code needed is in `/cloud`.
69+
70+
1. Make sure you have a cloudflare account.
71+
2. Create a worker.
72+
3. Create a kv.
73+
4. bind the kv to the worker.
74+
5. create environment variable `key` for the worker, puting the key to access this server.
75+
6. Paste code in `/cloud/clous.js` into your worker (Remove all the code in worker first) then deploy.

readme.zh_cn.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
- `key`: 访问服务器的密钥
5454

55-
返回:
55+
返回服务器限制(仅包含`maxPayloadSize``maxNameSize`), 例如:
5656

5757
```json
5858
{
@@ -61,5 +61,15 @@
6161
}
6262
```
6363

64-
## 一键部署
65-
利用cloudflare的worker和kv搭建免费服务器。具体代码在`/cloud``wrangler.toml`中填入你想使用的子域,你想设置的服务器密钥和你的kv的id后用cloudflare的`wrangler`部署即可。
64+
`maxPayloadSize`: 最大存档大小 (字节).
65+
`maxNameSize`: 最大存档名称大小 (字节).
66+
67+
## 在 cloudflare 上部署
68+
使用 cloudflare 的 worker 和 kv 搭建免费服务器. 所需代码位于 `/cloud`
69+
70+
1. 确保您拥有 cloudflare 帐户
71+
2. 创建一个 worker
72+
3. 创建一个 kv
73+
4. 将 kv 绑定到 worker
74+
5. 为 worker 创建环境变量 `key`,写入访问此服务器的密钥
75+
6.`/cloud/clous.js` 中的代码粘贴到 worker 中(首先删除 worker 中的所有代码)然后部署

0 commit comments

Comments
 (0)