• Product Introduction
  • Quick Start
    • Importing a Git Repository
    • Starting From a Template
    • Direct Upload
    • Start with AI
  • Framework Guide
    • Frontends
      • Vite
      • React
      • Vue
      • Other Frameworks
    • Backends
    • Full-stack
      • Next.js
      • Nuxt
      • Astro
      • React Router
      • SvelteKit
      • TanStack Start
      • Vike
    • Custom 404 Page
  • Project Guide
    • Project Management
    • edgeone.json
    • Configuring Cache
    • Error Codes
  • Build Guide
  • Deployment Guide
    • Overview
    • Create Deploys
    • Manage Deploys
    • Deploy Button
    • Using Github Actions
    • Using Gitlab CI/CD
    • Using CNB Plugin
    • Using IDE PlugIn
    • Using CodeBuddy IDE
  • Domain Management
    • Overview
    • Custom Domain
    • HTTPS Configuration
      • Overview
      • Apply for Free Certificate
      • Using Managed SSL Certificate
    • Configure DNS CNAME Record
  • Observability
    • Overview
    • Metric Analysis
    • Log Analysis
  • Pages Functions
    • Overview
    • Edge Functions
    • Cloud Functions
      • Overview
      • Node Functions
  • Middleware
  • KV Storage
  • Edge AI
  • API Token
  • EdgeOne CLI
  • Pages MCP
  • Message Notification
  • Integration Guide
    • AI
      • Dialogue Large Models Integration
      • Large Models for Images Integration
    • Database
      • Supabase Integration
      • Pages KV Integration
    • Ecommerce
      • Shopify Integration
      • WooCommerce Integration
    • Payment
      • Stripe Integration
      • Integrating Paddle
    • CMS
      • WordPress Integration
      • Contentful Integration
      • Sanity Integration
      • Payload Integration
    • Authentication
      • Supabase Integration
      • Clerk Integration
  • Best Practices
    • Using General Large Model to Quickly Build AI Application
    • Use the DeepSeek model to quickly build a conversational AI site
    • Building an Ecommerce Platform with Shopify
    • Building a SaaS Site Using Supabase and Stripe
    • Building a Company Brand Site Quickly
    • How to Quickly Build a Blog Site
  • Migration Guides
    • Migrating from Vercel to EdgeOne Pages
    • Migrating from Cloudflare Pages to EdgeOne Pages
    • Migrating from Netlify to EdgeOne Pages
  • Troubleshooting
  • FAQs
  • Contact Us
  • Release Notes

Overview

Pages Functions is a Serverless architecture solution that allows you to run server-side code without configuration or managing servers. It automatically scales based on website access traffic and provides stronger concurrent capability through EdgeOne global edge nodes. You can use Functions to deploy APIs and connect to multiple databases, helping you better implement projects with integration of front-end and back-end and deployment.
At deployment time, Pages automatically identifies the project framework and optimizes configurations, implementing smart routing and low-latency access based on EdgeOne edge network. Two types of Functions are currently available:
Cloud Functions provides multiple runtime environments, each has its own libraries, APIs and features, they each has its own strengths and weaknesses.
Node.js runtime environment is now supported, providing complete Node.js compatibility, supporting native modules and long calculation time, suitable for business scenarios deeply dependent on the Node.js ecosystem.
Edge Functions rely on global edge nodes, provide ultra-low latency and millisecond-level cold startup, suitable for high-concurrency, latency-sensitive business scenarios.
Note:
If you need to use Next.js specific grammar or framework context APIs, it is advisable to develop in the built-in API routing directory of Next.js. Pages will handle deployment automatically.

Getting Started

Cloud Functions takes Node Functions as an example. Under the ./node-functions/api directory of the project, use the following example code to create your first Node Functions:
export default function onRequest(context) {
return new Response('Hello from Node Functions!');
}
or through the Template to deploy application Node Functions of the project.
Under the ./edge-functions/api directory of the project, use the following example code to create your first Edge Functions:
export default function onRequest(context) {
return new Response('Hello from Edge Functions!');
}
or through the Template to deploy application Edge Functions of the project.

Difference between Cloud Functions and Edge Functions

Features
Cloud Functions
Edge Functions
Running location
Cloud Central
global edge node
cold start time
relatively long
millisecond-level
Latency performance
Moderately Low
extremely low
runtime environment
Multiple Runtime environments (Node.js Runtime is now supported)
Edge Runtime
Scenarios
complex data processing
extended execution time
high-concurrency, delay-sensitive
short execution time
For more information, refer to the Cloud Functions and Edge Functions documents.


ai-agent
You can ask me like
How to Get Started with EdgeOne Pages?