mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
feat: add CLI deployment instructions
This commit is contained in:
@@ -54,6 +54,27 @@ English:[`README_EN.md`](./README_EN.md)
|
||||
2. [](https://deploy.workers.cloudflare.com/?url=https://github.com/shuaiplus/nodewarden)
|
||||
3. 打开部署后生成的链接,并根据网页提示完成后续操作。
|
||||
|
||||
### CLI 部署
|
||||
|
||||
```powershell
|
||||
# 先把仓库拉到本地
|
||||
git clone https://github.com/shuaiplus/NodeWarden.git
|
||||
cd NodeWarden
|
||||
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# Cloudflare CLI 登录
|
||||
npx wrangler login
|
||||
|
||||
# 创建云资源(D1 + R2)
|
||||
npx wrangler d1 create nodewarden-db
|
||||
npx wrangler r2 bucket create nodewarden-attachments
|
||||
|
||||
# 部署
|
||||
npx wrangler deploy
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 本地开发
|
||||
@@ -64,16 +85,7 @@ English:[`README_EN.md`](./README_EN.md)
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 可选:登录 TOTP(2FA)
|
||||
|
||||
- 在 Workers 的 Variables and Secrets 里新增 Secret:`TOTP_SECRET`(Base32)。
|
||||
- 配置了 `TOTP_SECRET` 就启用登录 TOTP;删除该变量即关闭。
|
||||
- 客户端流程:密码 -> TOTP 验证码。
|
||||
- 支持“记住此设备”30 天。
|
||||
|
||||
---
|
||||
|
||||
## 常见问题
|
||||
|
||||
**Q: 如何备份数据?**
|
||||
|
||||
Reference in New Issue
Block a user