เว็บของคุณ → ออนไลน์ใน 30 วินาที
| Feature | Benefit |
|---|---|
| Free tier | 100,000 requests/day |
| Fast | Global CDN (300+ locations) |
| HTTPS | Auto SSL certificate |
| Git Integration | Push = Deploy |
URL ฟรี: your-name.workers.dev
git push origin main
↓
GitHub receives push
↓
Cloudflare detects change
↓
Auto build & deploy
↓
🎉 Live at workers.dev
ไม่ต้อง run command ใดๆ!
your-project/
├── wrangler.jsonc ← config (3 lines!)
└── public/ ← static files
├── index.html
├── styles.css
└── slides/
└── *.html
ทุกอย่างใน public/ = deploy ได้
{
"name": "your-project-name",
"compatibility_date": "2025-01-01",
"assets": {
"directory": "./public"
}
}
| Field | คืออะไร |
|---|---|
name | ชื่อ subdomain (.workers.dev) |
compatibility_date | Version ของ Workers API |
assets.directory | Folder ที่จะ deploy |
mainครั้งเดียวจบ!
| Setting | Value |
|---|---|
| Build command | (leave empty) |
| Build output | public |
| Root directory | / |
Static site = ไม่ต้อง build
# แก้ไขไฟล์
edit public/index.html
# Commit & Push
git add -A
git commit -m "update content"
git push origin main
# Done! Auto deploy ภายใน ~30 seconds
# ดู current files
ls public/
# Push changes
git add -A && git commit -m "new slides" && git push
# เปิดดู (รอ ~30 sec)
open https://siit-claude-code-workshops.laris.workers.dev/
Cloudflare จัดการทุกอย่าง
Cloudflare Dashboard:
หรือดู GitHub:
| Issue | Fix |
|---|---|
| Deploy ไม่ update | Check branch ถูกไหม |
| 404 error | Check assets.directory path |
| Build failed | ดู Cloudflare logs |
| Wrong content | Clear cache / wait 30s |
3 สิ่งที่ต้องจำ:
wrangler.jsonc (3 lines)git push (ทุกครั้งที่ update)git push = deploy
ง่ายแค่นี้!