feat: add docs (#122)

This commit is contained in:
Dream Hunter
2024-04-14 15:15:09 +08:00
committed by GitHub
parent fb74504282
commit 209693673d
43 changed files with 3073 additions and 16 deletions

View File

@@ -0,0 +1,25 @@
# Cloudflare Pages 前端
第一次部署会提示创建项目, `production` 分支请填写 `production`
```bash
cd frontend
pnpm install
cp .env.example .env.prod
```
修改 `.env.prod` 文件
`VITE_API_BASE` 修改为上一步创建的 `worker``url`, 不要在末尾加 `/`
例如: `VITE_API_BASE=https://xxx.xxx.workers.dev`
```bash
pnpm build --emptyOutDir
# 根据提示创建 pages
pnpm run deploy
```
部署完成之后你可以在 Cloudflare 控制台看到你的项目, 可以为 `pages` 配置自定义域名
![pages](/readme_assets/pages.png)