Skip to content

Commit

Permalink
doc: update
Browse files Browse the repository at this point in the history
  • Loading branch information
cwxia0s committed Nov 14, 2024
1 parent 8bba644 commit 7321006
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,24 @@ Bark-Worker is a [Bark-Server](https://github.com/Finb/bark-server) implenmentio
<!-- > [!CAUTION]
> After Cloudflare D1 is not in Beta, KV Version maybe deprecated. -->

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`

Expand Down
15 changes: 9 additions & 6 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,22 @@ Bark-Worker 是一个 [Bark-Server](https://github.com/Finb/bark-server) 在 Clo
<!-- > [!CAUTION]
> 当Cloudfalre D1不再Beta后, KV版本的Database部分可能停止维护. -->

参考 [部署指南](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`

Expand Down
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions main_kv.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 7321006

Please sign in to comment.