You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ A Mindustry mod to manage saves. Provides a variety of practical functions.
8
8
9
9
- Save editor
10
10
- Multiplayer
11
-
- Cloud save (need to build it yourself)
11
+
- Cloud save (need to build or deploy it yourself)
12
12
13
13
# Cloud Save
14
14
## protocol
@@ -52,7 +52,7 @@ Header:
52
52
53
53
-`key`: the key to access the server
54
54
55
-
Return:
55
+
Return the limitations of the server (only include `maxPayloadSize` and `maxNameSize`), for example:
56
56
57
57
```json
58
58
{
@@ -61,5 +61,15 @@ Return:
61
61
}
62
62
```
63
63
64
+
`maxPayloadSize`: max size of the save (byte).
65
+
`maxNameSize`: max size of the save name (byte).
66
+
64
67
## 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.
0 commit comments