Geliştirme Akışı
Günlük komutlar, dev vs start, Stripe webhook yerelde test.
Komutlar Özeti
Section titled “Komutlar Özeti”| Komut | Açıklama |
|---|---|
npm run dev | Vite geliştirme sunucusu — HMR, port 5173 |
npm run start | Wrangler yerel worker — port 8787, production’a yakın |
npm run build | Production build (build/client, build/server) |
npm run deploy | Build + Cloudflare Workers deploy |
npm run typecheck | React Router typegen + TypeScript kontrolü |
npm run cf-typegen | Cloudflare Workers TypeScript tipleri |
Ne Zaman Hangisi?
Section titled “Ne Zaman Hangisi?”- Günlük UI/route geliştirme:
npm run dev(hızlı, port 5173). - API, webhook, DB, Cloudflare binding testi:
npm run start(port 8787).
Stripe Webhook Yerelde
Section titled “Stripe Webhook Yerelde”- Önce
npm run startile Wrangler’ı başlatın. - Başka bir terminalde:
Terminal window stripe listen --forward-to localhost:8787/api/stripe/webhook - CLI’dan verilen
whsec_...değerini.dev.varsiçindeSTRIPE_WEBHOOK_SECRETolarak kullanın.
Vite ile test ediyorsanız --forward-to localhost:5173/api/stripe/webhook kullanın.
Main Proje vs Docs
Section titled “Main Proje vs Docs”- Ana uygulama (Coursio LMS): Proje kökünde
npm run dev/npm run start. - Bu dokümantasyon sitesi:
docs/klasöründenpm run dev/npm run build. Sadece dokümantasyonu düzenlemek için kullanılır.