mirror of
https://github.com/101island/lolisland.us.git
synced 2026-03-01 11:49:43 +08:00
docs: add cloudflare chat storage binding notes
This commit is contained in:
@@ -38,6 +38,15 @@ bun dev
|
||||
bun run build
|
||||
```
|
||||
|
||||
## Chat Storage on Cloudflare
|
||||
|
||||
Create the following bindings in Cloudflare Pages for this project:
|
||||
|
||||
- `CHAT_DB`: D1 database binding for chat messages.
|
||||
- `CHAT_IMAGES`: R2 bucket binding for chat image uploads.
|
||||
|
||||
The chat API auto-creates the `chat_messages` table and index on first request.
|
||||
|
||||
## Release Instructions
|
||||
|
||||
- Submit code to the `dev` branch.
|
||||
|
||||
@@ -38,6 +38,15 @@ bun dev
|
||||
bun run build
|
||||
```
|
||||
|
||||
## Cloudflare 聊天存储配置
|
||||
|
||||
请在 Cloudflare Pages 中为该项目绑定以下资源:
|
||||
|
||||
- `CHAT_DB`:用于聊天消息存储的 D1 数据库。
|
||||
- `CHAT_IMAGES`:用于聊天图片上传的 R2 Bucket。
|
||||
|
||||
聊天 API 会在首次请求时自动创建 `chat_messages` 表和索引。
|
||||
|
||||
## 发布说明
|
||||
|
||||
- 提交代码到 `dev` 分支。
|
||||
|
||||
Reference in New Issue
Block a user