feat: add CLI deployment instructions

This commit is contained in:
shuaiplus
2026-02-23 20:01:55 +08:00
parent f7a5966104
commit 2226bdd9ef
2 changed files with 42 additions and 17 deletions
+21 -8
View File
@@ -57,6 +57,27 @@
2. [![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/shuaiplus/nodewarden)
3. Open the generated service URL and follow the on-page instructions.
### CLI deploy
```powershell
# Clone repository
git clone https://github.com/shuaiplus/NodeWarden.git
cd NodeWarden
# Install dependencies
npm install
# Cloudflare CLI login
npx wrangler login
# Create cloud resources (D1 + R2)
npx wrangler d1 create nodewarden-db
npx wrangler r2 bucket create nodewarden-attachments
# Deploy
npx wrangler deploy
```
## Local development
@@ -66,14 +87,6 @@ This repo is a Cloudflare Workers TypeScript project (Wrangler).
npm install
npm run dev
```
## Optional Login TOTP (2FA)
- Add Workers Secret `TOTP_SECRET` (Base32) to enable login TOTP.
- Remove `TOTP_SECRET` to disable login TOTP.
- Client flow: password -> TOTP code.
- "Remember this device" is supported for 30 days.
---
## FAQ