Section 1: Lab: เตรียมเครื่องมือ
- ติดตั้ง Node.js รุ่น LTS และตรวจเวอร์ชันของ npm
- ติดตั้ง VS Code และ Extension สำหรับ TypeScript กับ NestJS
- ติดตั้ง Nest CLI และสร้างโปรเจกต์ด้วย nest new
- รันโปรเจกต์แบบ Watch Mode ด้วย npm run start:dev
- Lab: API แรกที่ตอบกลับจากเครื่องของตัวเอง
Section 2: Lab: TypeScript สำหรับ NestJS
- Type, Interface และ Type Alias
- Class, Access Modifier และ Constructor
- Generic และ async กับ await
- Decorator คืออะไร และ NestJS ใช้อย่างไร
- Lab: Model สินค้าและคำสั่งซื้อด้วย TypeScript
Section 3: รู้จัก NestJS และโครงสร้างโปรเจกต์
- NestJS คืออะไร และต่างจากการเขียน Express ตรง ๆ อย่างไร
- โปรเจกต์ ESM ของ NestJS 12 และไฟล์ main.ts
- ความสัมพันธ์ของ Module, Controller และ Provider
- สร้างโค้ดด้วย nest generate และ nest g resource
- Lab: สำรวจโปรเจกต์และเพิ่ม Resource แรก
Section 4: Lab: Controller และ Routing
- @Controller และ Decorator ของ HTTP Method
- รับค่าด้วย @Param, @Query และ @Body
- กำหนด Status Code, Header และ Redirect
- Wildcard แบบตั้งชื่อตามรูปแบบใหม่ของ Express 5
- Lab: REST API จัดการสินค้าแบบเก็บข้อมูลในหน่วยความจำ
Section 5: Provider, Service และ Dependency Injection
- สร้าง Service ด้วย @Injectable และแยก Logic ออกจาก Controller
- Constructor Injection และวงจรชีวิตของ Provider
- Custom Provider แบบ useValue, useClass และ useFactory
- อ่านค่าตั้งจาก Environment Variable ด้วย @nestjs/config
- Lab: ย้าย Logic สินค้าไปไว้ใน Service