Deploy an Express.js application on Cloudflare Workers
/workers/tutorials/deploy-an-express-app
Mở tutorial / guide ↗ Open tutorial / guide ↗Lộ trình đang học Current learning path
Developer Platform Developer Platform
Build và deploy apps trên Cloudflare. Build and deploy apps on Cloudflare.
Phần 2: API trên edge Part 2: APIs on the edge · Bài 2/2 Lesson 2/2
Dùng Worker khi cần middleware, auth edge, hoặc nhiều hostname. Worker là đơn vị compute linh hoạt nhất. Use a Worker when you need middleware, edge auth, or multiple hostnames. Workers are the most flexible compute unit.
Worker độc lập phù hợp middleware toàn zone, BFF, hoặc multi-tenant routing — linh hoạt hơn Pages Functions. Standalone Workers suit zone-wide middleware, BFFs, or multi-tenant routing — more flexible than Pages Functions.
Custom domain: Worker là origin, DNS/SSL tự động. Route: Worker chạy trước origin — cần DNS record proxied (orange cloud); thiếu record sẽ gây ERR_NAME_NOT_RESOLVED. Custom domain: the Worker is the origin with automatic DNS/SSL. Route: the Worker runs in front of an origin — you need a proxied DNS record (orange cloud); missing records cause ERR_NAME_NOT_RESOLVED.
Nguồn: Source: Workers Best Practices Workers Best Practices ↗
Ví dụ chính thức từ Cloudflare Resources — gợi ý theo chủ đề bài học trong lộ trình này. Official examples from Cloudflare Resources — matched to this lesson within this path.
/workers/tutorials/deploy-an-express-app
Mở tutorial / guide ↗ Open tutorial / guide ↗/workers-ai/guides/tutorials/image-generation-playground/image-generator-flux-newmodels
Mở tutorial / guide ↗ Open tutorial / guide ↗/workers/tutorials/build-a-qr-code-generator
Mở tutorial / guide ↗ Open tutorial / guide ↗/workers-ai/guides/tutorials/build-a-retrieval-augmented-generation-ai
Mở tutorial / guide ↗ Open tutorial / guide ↗Xem thêm ví dụ trong lộ trình → More examples in this path →
Dùng khi tự động hóa bước này qua script hoặc Terraform — cần API token phù hợp. Use when automating this step via script or Terraform — requires an appropriate API token.
Serverless global APIs Serverless global APIs
An example architecture of a serverless API on Cloudflare and aims to illustrate how different compute and data products could interact with each other. An example architecture of a serverless API on Cloudflare and aims to illustrate how different compute and data products could interact with each other.
Thuật ngữ: Concepts: Workers · D1 · R2 · Global API · Edge compute
Sơ đồ chính thức ↗ Official diagram ↗ · Serverless Serverless
Ba lộ trình độc lập — mỗi lộ trình chỉ gồm bài học và tài liệu trong phạm vi đó. Chọn lộ trình khác khi sẵn sàng, không cần học song song. Three independent paths — each includes only lessons and materials for that scope. Switch when you are ready; no need to study paths in parallel.
Bảo vệ và tăng tốc website, application và API Protect and accelerate websites, applications, and APIs
Vào lộ trình này → Enter this path →Bảo vệ users, access, SaaS và mạng doanh nghiệp Secure users, access, SaaS, and corporate networks
Vào lộ trình này → Enter this path →Chưa chắc — làm bài chọn lộ trình Not sure — use the path selector · So sánh cả ba lộ trình Compare all three paths