Express kursi

Node.js uchun minimal va tez web framework. REST API, middleware va routing.

O'rta · 75 ta dars · ~4 hafta

Mavzular: Routing, Middleware, Request/Response, Template Engines, Error Handling, Static Files, REST API, Authentication, Validation, Security

Kirish va Asoslar

  1. Express nima? Nima uchun kerak, boshqa frameworklar bilan farqi
  2. O'rnatish, birinchi server, qanday ishlaydi
  3. Routing — GET, POST, PUT, PATCH, DELETE
  4. Route parametrlar — params, query, body
  5. Response metodlari — send, json, status, redirect, download
  6. Static fayllar — express.static, papka sozlash

Middleware

  1. Middleware nima, qanday ishlaydi, ketma-ketlik muhimligi
  2. Built-in Middleware — express.json, express.urlencoded
  3. Third-party Middleware — morgan, compression, cors
  4. Custom Middleware — yaratish, next(), xatolarni uzatish
  5. Error Middleware — 4 parametrli, 404 handler
  6. Router — alohida fayllarga bo'lish, modullar

Ma'lumotlar Bazasi

  1. PostgreSQL — pg moduli, connection pool
  2. PostgreSQL — CRUD, parametrli so'rovlar, SQL Injection himoyasi
  3. MySQL — mysql2 moduli, CRUD
  4. MongoDB — mongoose, schema, model, CRUD
  5. Redis — ioredis, cache, TTL
  6. Database Transaction — nima, qachon kerak, qanday yoziladi
  7. Connection Pool — nima uchun kerak, qanday sozlanadi

Autentifikatsiya va Xavfsizlik

  1. JWT — yaratish, tekshirish, access va refresh token
  2. bcrypt — parolni hash qilish, solishtirish
  3. Passport.js — local strategiya, JWT strategiya
  4. Google OAuth — Passport bilan
  5. Session — express-session, cookie-session
  6. Cookie — cookie-parser, httpOnly, secure, sameSite
  7. Helmet — xavfsizlik headerlari
  8. Rate Limiting — express-rate-limit, brute force himoyasi
  9. CORS — nima, qanday sozlanadi, credentials, whitelist
  10. Input Validation — zod, joi bilan so'rovni tekshirish
  11. SQL Injection, XSS, CSRF — qanday himoyalanish
  12. Environment Variables — dotenv, maxfiy ma'lumotlarni saqlash

Fayl va Media

  1. Multer — fayl yuklash, storage, filter, size limit
  2. Sharp — rasmlarni qayta ishlash, resize, compress
  3. Amazon S3 — fayl saqlash, upload, delete, signed URL
  4. Streaming — katta fayllarni stream qilish

API Arxitekturasi

  1. REST API — qoidalar, best practices, versiyalash
  2. API Response formatini standartlashtirish
  3. Pagination — offset va cursor based
  4. Filtering va Sorting — query params bilan
  5. API dokumentatsiya — Swagger bilan
  6. Webhook — qabul qilish va yuborish

Real-time

  1. WebSocket — ws moduli bilan, handshake, event lar
  2. Socket.io — o'rnatish, room, namespace, broadcast
  3. Socket.io — autentifikatsiya, middleware
  4. Server-Sent Events — bir tomonlama real-time

Email va Xabarlar

  1. Nodemailer — SMTP, Gmail, email yuborish
  2. Email template — html email, handlebars
  3. SMS — Twilio bilan
  4. Push Notification — Firebase Cloud Messaging

Testing

  1. Jest — o'rnatish, birinchi test, describe, it, expect
  2. Supertest — HTTP endpoint larni testlash
  3. Unit Test — service va helper funksiyalarni testlash
  4. Integration Test — database bilan testlash
  5. Mock — funksiya, modul, database mock qilish
  6. Test Coverage — istanbul bilan

Performance va Monitoring

  1. Compression — gzip, brotli (tez kunda)
  2. Caching strategiyalari — server cache, HTTP cache, Redis cache (tez kunda)
  3. Load Testing — artillery, k6 bilan (tez kunda)
  4. Winston va Pino — professional logging (tez kunda)
  5. Morgan — HTTP request logging (tez kunda)
  6. PM2 — production da ishlatish, cluster mode (tez kunda)
  7. Memory Leak — Express da topish va hal qilish (tez kunda)

Deployment

  1. Environment — development, staging, production sozlash (tez kunda)
  2. Docker — Express ni containerlashtirish, Dockerfile (tez kunda)
  3. Docker Compose — Express, PostgreSQL, Redis birga (tez kunda)
  4. Nginx — reverse proxy, load balancer, SSL (tez kunda)
  5. CI/CD — GitHub Actions bilan avtomatik deploy (tez kunda)
  6. VPS — server sozlash, deploy qilish (tez kunda)
  7. Monitoring — uptime, error tracking, alerting (tez kunda)

Ilg'or mavzular

  1. Microservices — nima, qachon kerak, Express bilan (tez kunda)
  2. Message Queue — RabbitMQ, Bull bilan (tez kunda)
  3. GraphQL — Express bilan apollo-server (tez kunda)
  4. gRPC — nima, REST dan farqi, Express bilan (tez kunda)
  5. Clean Architecture — Express loyihasini professional tuzish (tez kunda)
  6. Monorepo — Express loyihalarini birga boshqarish (tez kunda)