🚀 Cloudflare Pages Functions
Hello World 示例项目
📡 API 函数测试
点击按钮测试不同的 Cloudflare Functions:
Hello World
获取服务器时间
获取用户代理
POST 请求测试
点击上方按钮开始测试...
📁 项目结构
project/
├── index.html # 主页面
├── functions/
│ ├── api/
│ │ ├── hello.js # Hello World API
│ │ ├── time.js # 时间 API
│ │ └── user.js # 用户信息 API
│ └── test.js # POST 请求测试
🚀 部署说明
将整个项目文件夹上传到 Cloudflare Pages
或者连接 GitHub 仓库进行自动部署
Functions 会自动部署到
/api/*
和
/test
路径
访问你的域名即可看到这个页面