快速上手
前置:已购买许可、Node.js 20+、npm,以及 Cloudflare 账号(用 Wrangler 建 D1 / R2)。
0. 购买并接受邀请
Section titled “0. 购买并接受邀请”- 在 storecay.com 完成购买。
- 查收邮件 / GitHub 通知中的 协作者邀请(仓库
storecay/store-cay-starter)。 - 接受邀请(未接受前无法克隆该私有仓库)。
git clone https://github.com/storecay/store-cay-starter.gitcd store-cay-starternpm installcp .env.example .env2. 创建本地 D1 与 R2
Section titled “2. 创建本地 D1 与 R2”npx wrangler d1 create store-cay-starter-dbnpx wrangler r2 bucket create store-cay-starter-images把返回的 database_id 写入 wrangler.jsonc(并确认 R2 桶名与 STORAGE 一致)。
3. 迁移与种子数据
Section titled “3. 迁移与种子数据”npx wrangler d1 migrations apply DB --localnpx tsx scripts/seed-admin.ts admin@storecay.test secret123 "Cay Admin"npm run seed:productsnpm run dev- 前台:http://localhost:8000/
- 后台:http://localhost:8000/admin/login(默认
admin@storecay.test/secret123)
想直接上云?
Section titled “想直接上云?”有仓库权限后,见 一键部署。