mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +00:00
feat: add CLI deployment instructions
This commit is contained in:
+21
-8
@@ -57,6 +57,27 @@
|
||||
2. [](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
|
||||
|
||||
Reference in New Issue
Block a user