Files
new-api-key-usage/.env.example
T
skycurtain 138a1b7685 chore: 初始化 monorepo 脚手架与代码骨架
- Bun workspaces:apps/web(Vue 3.5 + Vite 8 + naive-ui)· apps/server(Hono 4.13 + Drizzle)· packages/shared(契约类型)
- 代码骨架:四表 Drizzle schema · 11 个端点占位(501)· 管理面口令中间件 · 同步引擎占位(5 分钟 tick + 防重入)
- 命令链:dev / build / test / lint / type-check / db:*(见 AGENTS.md)
2026-09-14 23:54:58 +08:00

19 lines
706 B
Bash
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.
# 环境变量样例 —— 复制为 .env 并填真实值(.env 不入库;部署时由实例运营方经 env 注入)
# ---- 服务端(apps/server) ----
# 监听端口(Vite dev 代理与生产反代都指向它)
PORT=3000
# PostgreSQL 连接串
DATABASE_URL=postgres://user:password@localhost:5432/new_api_key_usage
# 管理面口令(请求头 X-Manage-Token;见 API 契约 约定 6)
MANAGE_TOKEN=change-me
# 凭证主密钥(HKDF 派生 hmac / aes 子密钥;丢失 = 全部 key 需重新登记)
KEYS_MASTER_KEY=change-me-32-bytes-base64
# 上游 NewAPI 站点地址(同步引擎调用的 BaseURL,不带尾部斜杠)
NEWAPI_BASE=https://your-newapi-instance.example.com