Feat : Setup cloudflare worker for cloud endpoint

This commit is contained in:
decolua
2026-02-09 11:27:41 +07:00
parent c68b875a36
commit 102c193112
25 changed files with 1739 additions and 82 deletions

25
cloud/README.md Normal file
View File

@@ -0,0 +1,25 @@
# 9Router Cloud Worker
Deploy your own Cloudflare Worker to access 9Router from anywhere.
## Setup
```bash
# 1. Login to Cloudflare
npm install -g wrangler
wrangler login
# 2. Install dependencies
cd app/cloud
npm install
# 3. Create KV & D1, then paste IDs into wrangler.toml
wrangler kv namespace create KV
wrangler d1 create proxy-db
# 4. Init database & deploy
wrangler d1 execute proxy-db --remote --file=./migrations/0001_init.sql
npm run deploy
```
Copy your Worker URL → 9Router Dashboard → **Endpoint****Setup Cloud** → paste → **Save****Enable Cloud**.