Cloudflare Workers Cloudflare Workers Cloudflare Workers
Ship Bookmark API Ship a Bookmark API Ship Bookmark API
Routing, KV, D1 và Workers AI — xây Bookmark API từ zero rồi deploy. Routing, KV, D1, and Workers AI — build a Bookmark API from scratch, then deploy. Routing, KV, D1 និង Workers AI — សង់ Bookmark API ពីសូន្យ បន្ទាប់មក deploy។
- HTTP APIs
- KV
- D1
- Workers AI
- 1
Bắt đầu: auth, C3, đọc code, test Getting started: auth, C3, read the code, test ចាប់ផ្តើម៖ auth, C3, អាន code, test
Đăng nhập Cloudflare, tạo project Bookmark API, hiểu file, chạy local. Sign in to Cloudflare, create the Bookmark API project, read the files, run locally. ចូល Cloudflare បង្កើត project Bookmark API អាន file រត់ local។
- 2
Routes và CRUD Routes and CRUD Routes និង CRUD
Type Bookmark, router, handler create/list/get/delete — test luôn error case. Bookmark type, router, create/list/get/delete handlers — including error cases. Type Bookmark, router, handler create/list/get/delete — រួមទាំងករណី error។
- 3
KV lưu bền Persistent KV storage ការផ្ទុក KV ជាប់
Tạo namespace KV, đổi handler sang binding, kiểm tra data còn sau restart. Create a KV namespace, switch handlers to the binding, confirm data survives restart. បង្កើត namespace KV ប្តូរ handler ទៅ binding ពិនិត្យថា data នៅក្រោយ restart។
- 4
D1 + cache KV D1 + KV cache D1 + cache KV
Schema SQL, tag, filter; KV làm cache đọc — đo cache hit. SQL schema, tags, filters; KV as a read cache — check cache hits. Schema SQL, tag, filter; KV ជា cache អាន — ពិនិត្យ cache hit។
- 5
Tóm tắt bằng Workers AI AI-powered summaries សង្ខេបដោយ Workers AI
AI binding, cột summary trên D1, generate khi tạo bookmark. AI binding, a D1 summary column, generate on bookmark create. AI binding, ជួរឈរ summary លើ D1, generate ពេលបង្កើត bookmark។
- 6
AI Gateway AI Gateway AI Gateway
Đưa inference qua Gateway — cache, rate limit, xem analytics dashboard. Route inference through Gateway — cache, rate limit, read dashboard analytics. បញ្ជូន inference តាម Gateway — cache, rate limit, មើល analytics dashboard។
- 7
Deploy production Deploy to production Deploy ទៅ production
Tạo resource remote, wrangler deploy, wrangler tail, rollback khi cần. Create remote resources, wrangler deploy, wrangler tail, roll back if needed. បង្កើត resource remote, wrangler deploy, wrangler tail, rollback ពេលចាំបាច់។
Ghép với lộ trình hub Fits this hub path សមនឹងផ្លូវ hub នេះ
Sau Phần 1 (Worker + Wrangler) và Phần 3 (KV/D1). Lab AI + Gateway khớp Phần 5. After Part 1 (Worker + Wrangler) and Part 3 (KV/D1). The AI + Gateway labs match Part 5. បន្ទាប់ពីផ្នែក 1 (Worker + Wrangler) និងផ្នែក 3 (KV/D1)។ Lab AI + Gateway សមនឹងផ្នែក 5។