Skip to content

premix-labs/axum-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 เรียน Axum ฉบับสมบูรณ์

License: MIT Language: Thai Axum mdBook

🚀 Tutorial สร้าง Web Application ด้วย Axum Framework | คำอธิบายภาษาไทย | โค้ดภาษาอังกฤษ

🌐 อ่านออนไลน์

👉 อ่านหนังสือออนไลน์


✨ Features

  • 📖 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

🚀 เริ่มต้นใช้งาน

วิธีที่ 1: อ่านออนไลน์ (แนะนำ)

เปิด https://premix-kernel.github.io/axum-tutorial

วิธีที่ 2: รันในเครื่อง

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 test

วิธีที่ 3: รัน Examples

cargo 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

📖 เนื้อหา (15 บท)

Part 1: พื้นฐาน

บท หัวข้อ คำอธิบาย
1 Introduction Axum คืออะไร, Ecosystem
2 Getting Started ติดตั้ง, Hello World
3 Routing Path/Query params, Nested routes
4 Handlers Request/Response, JSON, HTML

Part 2: Core Concepts

บท หัวข้อ คำอธิบาย
5 Extractors Built-in, Custom, Optional
6 State App state, Shared patterns
7 Middleware Tower layers, Custom
8 Error Handling IntoResponse, Propagation

Part 3: Database & Auth

บท หัวข้อ คำอธิบาย
9 Database SQLx, Migrations, Transactions
10 Authentication Sessions, JWT
11 Authorization RBAC, Protected routes

Part 4: Advanced

บท หัวข้อ คำอธิบาย
12 WebSockets Real-time, Broadcasting
13 Files Upload, Static serving
14 Testing Unit, Integration

Part 5: Production

บท หัวข้อ คำอธิบาย
15 Deployment Docker, Graceful shutdown, Observability

🎯 Prerequisites

  • ✅ มีพื้นฐาน Rust (Ownership, Traits, Async)
  • ✅ เข้าใจ HTTP basics
  • ✅ (Optional) PostgreSQL สำหรับบท Database

🤝 Contributing

ยินดีรับทุกการมีส่วนร่วม! ดู CONTRIBUTING.md สำหรับรายละเอียด


📜 License

โปรเจกต์นี้อยู่ภายใต้ MIT License


🚀 Happy Coding with Axum!

Made with ❤️ for Thai Rustaceans

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors