Files
termi-blog/backend/README.md
limitcool 381dc9b854
Some checks failed
docker-images / resolve-build-targets (push) Successful in 5s
docker-images / build-and-push (admin) (push) Successful in 30s
docker-images / submit-indexnow (push) Has been cancelled
docker-images / build-and-push (frontend) (push) Has been cancelled
docker-images / build-and-push (backend) (push) Has been cancelled
Fix web push delivery handling and worker console
2026-04-04 04:15:20 +08:00

40 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# backend
Loco.rs backend当前仅保留 API 与后台鉴权相关逻辑,不再提供旧的 Tera HTML 后台页面。
## 本地启动
```powershell
cargo loco start --server-and-worker
```
默认本地监听:
- `http://localhost:5150`
如果只启动 `cargo loco start` 而没有 `worker`,浏览器推送、异步通知、失败重试这类 Redis 队列任务会入队但没人消费。
## 当前职责
- 文章 / 分类 / 标签 / 评论 / 友链 / 评测 API
- admin 登录态与后台接口
- 站点设置与 AI 相关后端能力
- Markdown frontmatter 与数据库双向同步
- 内容生命周期:`draft / published / scheduled / offline / expired`
- 可见性与 SEO`public / unlisted / private``canonical``noindex``OG`、redirect
- Webhook 通知:新评论 / 新友链申请
- 内容消费统计:`page_view / read_progress / read_complete`
## 生产部署
生产环境推荐通过环境变量注入:
- `APP_BASE_URL`
- `DATABASE_URL`
- `REDIS_URL`
- `JWT_SECRET`
Docker / compose 相关示例见仓库根目录:
- `deploy/docker/compose.package.yml`