EdgeOne Pages React Router Starter - Pages Functions
Pages Functions is a serverless architecture solution that allows you to run server-side code without configuring or managing servers.
Supports auto-scaling, global edge deployment, API development, and database connections for seamless full-stack integration.
Edge Functions
Run code on 3200+ global edge nodes with ultra-low latency and elastic auto-scaling.
Ideal for high-concurrency, latency-sensitive scenarios like lightweight APIs, real-time notifications, content personalization, and A/B testing. Millisecond cold start with short execution time.
// edge-functions/hello.js
export default function onRequest(context) {
const {geo} = context;
return new Response(JSON.stringify({
message: 'Hello Edge!',
geo: geo,
}), {
headers: {
'Content-Type': 'application/json',
},
})
}Node Functions
Full Node.js runtime with rich npm ecosystem and native modules for powerful server-side processing.
Perfect for Node.js-dependent workloads, complex data processing, database operations, and third-party integrations. Runs in cloud centers with support for long-running tasks.
// node-functions/hello.js
export default function onRequest(context) {
return new Response('Hello Node!')
}