mirror of
https://github.com/Vb-Lg/class-history-template.git
synced 2026-11-03 16:26:40 +00:00
docs: correct .env scope note; give exact wrangler local-debug command
This commit is contained in:
1 parent
36910d9f05
commit
2c1f508b14
2 files changed
+4
-3
No files matched your search
+3
-2
@@ -1,7 +1,8 @@
|
||||
# 复制为 .env 使用。注意:
|
||||
# - PUBLIC_TURNSTILE_SITE_KEY 是构建时变量,本地构建需要;
|
||||
# - GITHUB_* / TURNSTILE_SECRET_KEY 是 Cloudflare Pages Functions 的
|
||||
# 运行时变量,本地 .env 不会生效,需在 Pages 控制台配置(见 README)。
|
||||
# - GITHUB_* / TURNSTILE_SECRET_KEY 是 Pages Functions 的运行时变量:
|
||||
# 线上须在 Pages 控制台配置(本地 .env 不会随部署上传);
|
||||
# 本地调试 API(npx wrangler pages dev dist)时 wrangler 会自动读取本文件。
|
||||
|
||||
# ---- 投稿后端:GitHub App(详见 README「创建 GitHub App」一节) ----
|
||||
GITHUB_APP_ID=
|
||||
|
||||
@@ -40,7 +40,7 @@ npm install
|
||||
npm run dev # http://localhost:4321
|
||||
```
|
||||
|
||||
注意:`npm run dev` 只渲染页面,`/api/*` 由 Pages Functions 提供服务,只有线上可用——本地留言墙会显示「加载失败」、投稿提交会报错,属正常现象。需要本地调试 API 时可用 `npx wrangler pages dev`。
|
||||
注意:`npm run dev` 只渲染页面,`/api/*` 由 Pages Functions 提供服务,只有线上可用——本地留言墙会显示「加载失败」、投稿提交会报错,属正常现象。需要本地调试 API 时:`npm run build` 后运行 `npx wrangler pages dev dist --d1 DB`,步骤详见 [Wiki · Quick Start](https://github.com/Vb-Lg/class-history-template/wiki/Quick-Start)。
|
||||
|
||||
## 定制班级信息
|
||||
|
||||
|
||||
Reference in new issue
Block a user