🚀 Tutorial สร้าง Web Application ด้วย Axum Framework | คำอธิบายภาษาไทย | โค้ดภาษาอังกฤษ
- 📖 15 บทเรียน ครอบคลุมตั้งแต่ Hello World ถึง Production Deployment
- 🔧 Axum 0.8+ ใช้ฟีเจอร์ล่าสุด (Jan 2025)
- 📝 15+ แบบฝึกหัด พร้อมเฉลย
- ❓ 18 Quiz ทดสอบความเข้าใจ
- 🗄️ Database Integration ด้วย SQLx
- 🔐 Auth & Security JWT, Sessions, OAuth, RBAC
- 🧪 Testing Unit, Integration, E2E
- 🐳 Docker Deployment พร้อม Production Config
เปิด https://premix-kernel.github.io/axum-tutorial
git clone https://github.com/premix-kernel/axum-tutorial.git
cd axum-tutorial
# ติดตั้ง mdBook
cargo install mdbook
# รัน development server
cd docs
mdbook serve
# เปิด http://localhost:3000
# ทดสอบ code examples
mdbook testcargo run --example hello_world # Hello World
cargo run --example routing # Routing + Path/Query
cargo run --example extractors # Extractors + Custom
cargo run --example state # State Management
cargo run --example middleware # Middleware + Auth
cargo run --example error_handling # Error Handling
cargo run --example websocket # WebSocket
cargo run --example static_files # Static Files| บท | หัวข้อ | คำอธิบาย |
|---|---|---|
| 1 | Introduction | Axum คืออะไร, Ecosystem |
| 2 | Getting Started | ติดตั้ง, Hello World |
| 3 | Routing | Path/Query params, Nested routes |
| 4 | Handlers | Request/Response, JSON, HTML |
| บท | หัวข้อ | คำอธิบาย |
|---|---|---|
| 5 | Extractors | Built-in, Custom, Optional |
| 6 | State | App state, Shared patterns |
| 7 | Middleware | Tower layers, Custom |
| 8 | Error Handling | IntoResponse, Propagation |
| บท | หัวข้อ | คำอธิบาย |
|---|---|---|
| 9 | Database | SQLx, Migrations, Transactions |
| 10 | Authentication | Sessions, JWT |
| 11 | Authorization | RBAC, Protected routes |
| บท | หัวข้อ | คำอธิบาย |
|---|---|---|
| 12 | WebSockets | Real-time, Broadcasting |
| 13 | Files | Upload, Static serving |
| 14 | Testing | Unit, Integration |
| บท | หัวข้อ | คำอธิบาย |
|---|---|---|
| 15 | Deployment | Docker, Graceful shutdown, Observability |
- ✅ มีพื้นฐาน Rust (Ownership, Traits, Async)
- ✅ เข้าใจ HTTP basics
- ✅ (Optional) PostgreSQL สำหรับบท Database
ยินดีรับทุกการมีส่วนร่วม! ดู CONTRIBUTING.md สำหรับรายละเอียด
โปรเจกต์นี้อยู่ภายใต้ MIT License
🚀 Happy Coding with Axum!
Made with ❤️ for Thai Rustaceans