diff --git a/README.md b/README.md index 269bdbc..6afa97f 100644 --- a/README.md +++ b/README.md @@ -41,19 +41,24 @@ Bark-Worker is a [Bark-Server](https://github.com/Finb/bark-server) implenmentio -Refer to [Setup Guide](doc/setup_guide.md) +### Follow the instructions for D1 Version -### Cloudflare D1 Version +[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cwxiaos/bark-worker) -Follow the instructions: +> [!NOTE] +> The Cloudflare API Token must have D1 permission. -[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cwxiaos/bark-worker) +### Or manually deploy + +Refer to [Setup Guide](doc/setup_guide.md) + +#### Cloudflare D1 Version Or Manually Deploy Create a Worker and a D1 Database, bind D1 database to Worker with name `database` -### Cloudflare KV Version +#### Cloudflare KV Version Create a Worker and a KV Storage, bind KV Storage to Worker with name `database` diff --git a/README.zh.md b/README.zh.md index 15c3fcd..2484acb 100644 --- a/README.zh.md +++ b/README.zh.md @@ -41,19 +41,22 @@ Bark-Worker 是一个 [Bark-Server](https://github.com/Finb/bark-server) 在 Clo -参考 [部署指南](doc/setup_guide.zh.md) +### 直接部署D1版本 + +[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cwxiaos/bark-worker) -### Cloudflare D1 版本 +> [!NOTE] +> Cloudflare API Token必须有D1权限 -跟随提示部署: +### 或手动部署 -[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cwxiaos/bark-worker) +参考 [部署指南](doc/setup_guide.zh.md) -或手动部署: +#### Cloudflare D1 版本 创建一个Worker和D1 数据库, 将D1 数据库绑定至Worker并命名为 `database` -### Cloudflare KV 版本 +#### Cloudflare KV 版本 创建一个Worker和KV 存储, 将KV 存储绑定至Worker并命名为 `database` diff --git a/main.js b/main.js index 301d168..cab6b0b 100644 --- a/main.js +++ b/main.js @@ -129,9 +129,9 @@ async function handleRequest(request, env, ctx) { class Handler { constructor(env) { this.version = "v2.1.2" - this.build = "2024-11-14 20:07:34" + this.build = "2024-11-14 20:10:05" this.arch = "js" - this.commit = "2f7baa11bf7997b70dbcae54cfa5cfc9e43082c4" + this.commit = "8bba6448095f56b0340b2df2af8eb7fbd13a5933" const db = new Database(env) diff --git a/main_kv.js b/main_kv.js index 24ba67f..f913ee5 100644 --- a/main_kv.js +++ b/main_kv.js @@ -129,9 +129,9 @@ async function handleRequest(request, env, ctx) { class Handler { constructor(env) { this.version = "v2.1.2" - this.build = "2024-11-14 20:07:34" + this.build = "2024-11-14 20:10:05" this.arch = "js" - this.commit = "2f7baa11bf7997b70dbcae54cfa5cfc9e43082c4" + this.commit = "8bba6448095f56b0340b2df2af8eb7fbd13a5933" const db = new Database(env)