Lộ trình đang học Current learning path Current learning path

Developer Platform Developer Platform Developer Platform

Lộ trình cho người muốn ship API hoặc tool mà không quản máy chủ. Đọc bài kiến thức, rồi làm lab hub, rồi lab chính thức nếu có. A path for people who want to ship an API or a tool without running a server. Read the knowledge lesson, do the hub lab, then the official lab when one exists. ផ្លូវសម្រាប់អ្នកចង់ ship API ឬ tool ដោយមិនដំណើរការ server។ អានមេរៀនចំណេះដឹង រួចធ្វើ lab hub រួច lab ផ្លូវការ បើមាន។

Về trang lộ trình Track home Track home

Phần 2: Pages (tương thích Git site) Part 2: Pages (Git site compatibility) ផ្នែក 2: Pages (ភាពត្រូវគ្នានែ Git site) · Bài 1/3 Lesson 1/3 Lesson 1/3

Kiến thức Knowledge Knowledge Khoảng 12 phút About 12 min About 12 min

Pages và Functions Pages and Functions Pages and Functions

Nên đọc trước: Read first: Read first: Worker, C3 và Wrangler Workers, C3, and Wrangler Workers, C3, and Wrangler

Ý chính Main ideas Main ideas

Pages lấy site từ Git, build, rồi giữ file trong output directory. Function là Worker gắn với site đó. Đây không phải mẫu cho API mới. Pages takes a site from Git, builds it, and keeps the files in the output directory. A Function is a Worker attached to that site. This is not the template for a new API. Pages takes a site from Git, builds it, and keeps the files in the output directory. A Function is a Worker attached to that site. This is not the template for a new API.

Cách hoạt động How it works How it works

Bạn nối repo Git. Pages chạy lệnh build (ví dụ `npm run build`) và lấy thư mục output (`dist` với Astro, `build` với một số framework khác). Sai thư mục thì site trắng. Mỗi pull request có URL preview. You connect a Git repo. Pages runs the build command (for example `npm run build`) and takes the output folder (`dist` for Astro, `build` for some other frameworks). The wrong folder means a blank site. Each pull request gets a preview URL. You connect a Git repo. Pages runs the build command (for example `npm run build`) and takes the output folder (`dist` for Astro, `build` for some other frameworks). The wrong folder means a blank site. Each pull request gets a preview URL.

Kiến trúc Architecture Architecture

File tĩnh đi thẳng từ Pages. Request khớp Function thì tính như một request Worker và dùng chung hạn mức Workers. Hub này là site nội dung trên Pages. API mới thì tách Worker. Static files come straight from Pages. A request that matches a Function counts as a Worker request and shares the Workers quota. This hub is a content site on Pages. A new API should be its own Worker. Static files come straight from Pages. A request that matches a Function counts as a Worker request and shares the Workers quota. This hub is a content site on Pages. A new API should be its own Worker.

Khi nào dùng When to use it When to use it

Dùng Pages khi site framework đã nằm trên Git và bạn muốn preview theo pull request. Use Pages when a framework site already lives in Git and you want a preview per pull request. Use Pages when a framework site already lives in Git and you want a preview per pull request.

Khi nào không dùng When not to use it When not to use it

Đừng chọn Pages làm bước đầu cho service không có giao diện tĩnh. Đừng đoán tên thư mục output. Do not pick Pages as the first step for a service with no static UI. Do not guess the output folder name. Do not pick Pages as the first step for a service with no static UI. Do not guess the output folder name.

Gói và giới hạn Plans and limits Plans and limits

Request Function tính vào hạn mức Workers. Docs lấy ví dụ: 50.000 request Function và 50.000 request Worker dùng hết 100.000 request/ngày của Free. File tĩnh không tính. Kiểm tra 2026-11-15. Nguồn: https://developers.cloudflare.com/pages/functions/pricing/ Function requests count toward the Workers quota. The docs use this example: 50,000 Function requests plus 50,000 Worker requests use up the Free plan’s 100,000 requests per day. Static files do not count. Checked 2026-11-15. Source: https://developers.cloudflare.com/pages/functions/pricing/ Function requests count toward the Workers quota. The docs use this example: 50,000 Function requests plus 50,000 Worker requests use up the Free plan’s 100,000 requests per day. Static files do not count. Checked 2026-11-15. Source: https://developers.cloudflare.com/pages/functions/pricing/

Không phải báo giá. Đối chiếu docs và dashboard. Kiểm tra lần cuối: 2026-11-11. Not a price quote. Check the docs and the dashboard. Last checked: 2026-11-11. Not a price quote. Check the docs and the dashboard. Last checked: 2026-11-11.

Thuật ngữ Glossary Glossary

  • Output directory Output directory Output directory

    Thư mục chứa site sau khi build. Pages chỉ publish thư mục này. The folder that holds the site after the build. Pages publishes only this folder. The folder that holds the site after the build. Pages publishes only this folder.

  • Function Function Function

    Code chạy trên Pages, cùng runtime với Worker. Code that runs on Pages, on the same runtime as a Worker. Code that runs on Pages, on the same runtime as a Worker.

Mở bảng thuật ngữ → Open the glossary → Open the glossary →

Làm lab Do the lab Do the lab

Lab nằm ở bài riêng. Đọc ý chính trước, rồi mở lab. Labs live on their own pages. Read the main ideas, then open a lab. Labs live on their own pages. Read the main ideas, then open a lab.

Ví dụ triển khai (Cloudflare Resources) Deployment examples (Cloudflare Resources) Deployment examples (Cloudflare Resources)

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. Official examples from Cloudflare Resources — matched to this lesson within this path.

Tutorial Tutorial Tutorial Developer Platform Developer Platform Developer Platform

Thêm React form với Formspree Add a React form with Formspree បន្ថែមទម្រង់ប្រតិកម្មជាមួយ Formspree

Tìm hiểu cách thêm React form với Formspree, một dịch vụ back-end xử lý và lưu trữ form.

Learn how to add a React form with Formspree, a back-end service that handles form processing and storage.

ស្វែងយល់ពីរបៀបបន្ថែមទម្រង់ React ជាមួយ Formspree ដែលជាសេវាកម្មផ្នែកខាងក្រោយដែលគ្រប់គ្រងដំណើរការ និងការផ្ទុកទម្រង់។

Tìm hiểu thêm Learn more ស្វែងយល់បន្ថែម
Tutorial Tutorial Tutorial Developer Platform Developer Platform Developer Platform

Thêm một site Add a site បន្ថែមគេហទំព័រ

Hướng dẫn này sử dụng Pulumi Infrastructure as Code (IaC) để làm quen với vòng đời quản lý tài nguyên.

This tutorial uses Pulumi infrastructure as code (IaC) to familiarize yourself with the resource management lifecycle.

ការបង្រៀននេះប្រើហេដ្ឋារចនាសម្ព័ន្ធ Pulumi ជាកូដ (IaC) ដើម្បីស្គាល់ខ្លួនអ្នកជាមួយនឹងវដ្តជីវិតនៃការគ្រប់គ្រងធនធាន។

Tìm hiểu thêm Learn more ស្វែងយល់បន្ថែម
Tutorial Tutorial Tutorial Developer Platform Developer Platform Developer Platform

Thêm HTML form với Formspree Add an HTML form with Formspree បន្ថែម HTML form ជាមួយ Formspree

Học cách thêm HTML form với Formspree — dịch vụ back-end xử lý và lưu dữ liệu form.

Learn how to add an HTML form with Formspree, a back-end service that handles form processing and storage.

រៀនរបៀបបន្ថែម HTML form ជាមួយ Formspree — សេវា back-end ដែលដំណើរការ និងរក្សាទុកទិន្នន័យ form។

Tìm hiểu thêm Learn more ស្វែងយល់បន្ថែម
Tutorial Tutorial Tutorial Developer Platform Developer Platform Developer Platform

Thêm mô hình AI mới vào sân chơi của bạn (Phần 2) Add New AI Models to your Playground (Part 2) បន្ថែមម៉ូដែល AI ថ្មីទៅក្នុងសួនកុមាររបស់អ្នក (ផ្នែកទី 2)

Trong phần 2, Kristian mở rộng trên môi trường hiện có được xây dựng trong phần 1, bằng cách cho bạn thấy cách tích hợp các mô hình AI mới và giới thiệu các thông số mới cho phép bạn tùy chỉnh cách images được tạo ra.

In part 2, Kristian expands upon the existing environment built in part 1, by showing you how to integrate new AI models and introduce new parameters that allow you to customize how images are generated.

នៅក្នុងផ្នែកទី 2 Kristian ពង្រីកលើបរិស្ថានដែលមានស្រាប់ដែលបានសាងសង់ក្នុងផ្នែកទី 1 ដោយបង្ហាញអ្នកពីរបៀបបញ្ចូលគំរូ AI ថ្មី និងណែនាំប៉ារ៉ាម៉ែត្រថ្មីដែលអនុញ្ញាតឱ្យអ្នកប្ដូរតាមបំណងពីរបៀបដែល images ត្រូវបានបង្កើត។

Tìm hiểu thêm Learn more ស្វែងយល់បន្ថែម

Xem thêm ví dụ trong lộ trình → More examples in this path → More examples in this path →

Tài liệu Cloudflare Developers Cloudflare Developer docs Cloudflare Developer docs

Học xong hoặc muốn đổi hướng? Finished or want a different path? Finished or want a different path?

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. Three independent paths — each includes only lessons and materials for that scope. Switch when you are ready; no need to study paths in parallel.

Chưa chắc — làm bài chọn lộ trình Not sure — use the path selector Not sure — use the path selector · So sánh cả ba lộ trình Compare all three paths Compare all three paths