跳转到内容

快速上手

前置:已购买许可、Node.js 20+、npm,以及 Cloudflare 账号(用 Wrangler 建 D1 / R2)。

  1. 在 storecay.com 完成购买。
  2. 查收邮件 / GitHub 通知中的 协作者邀请(仓库 storecay/store-cay-starter)。
  3. 接受邀请(未接受前无法克隆该私有仓库)。
Terminal window
git clone https://github.com/storecay/store-cay-starter.git
cd store-cay-starter
npm install
cp .env.example .env
Terminal window
npx wrangler d1 create store-cay-starter-db
npx wrangler r2 bucket create store-cay-starter-images

把返回的 database_id 写入 wrangler.jsonc(并确认 R2 桶名与 STORAGE 一致)。

Terminal window
npx wrangler d1 migrations apply DB --local
npx tsx scripts/seed-admin.ts admin@storecay.test secret123 "Cay Admin"
npm run seed:products
Terminal window
npm run dev

有仓库权限后,见 一键部署。