• Product Introduction
  • Quick Start
    • Importing a Git Repository
    • Starting From a Template
    • Direct Upload
  • Framework Guide
    • Frontends
    • Backends
    • Full-stack
      • Next.js
  • Project Guide
    • Project Management
    • edgeone.json
    • Configuring Cache
    • Error Codes
  • Build Guide
  • Deployment Guide
    • Overview
    • Create Deploys
    • Manage Deploys
    • Deploy Button
    • Use Github Actions
    • Using CNB Plugin
    • Using IDE Plug-In
    • Using CodeBuddy IDE
  • Domain Management
    • Overview
    • Custom Domain
    • Configuring an HTTPS Certificate
    • How to Configure a DNS CNAME Record
  • Pages Functions
    • Overview
    • Edge Functions
    • Node Functions
  • Log Analysis
  • KV Storage
  • Edge AI
  • API Token
  • EdgeOne CLI
  • Pages MCP
  • 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
    • Authentication
      • Supabase Integration
      • Clerk Integration
  • Best Practices
    • Using General Large Model to Quickly Build AI Application
    • Use the Deepseek-R1 model to quickly build a conversational AI site
    • Building an Ecommerce Platform with WordPress + WooCommerce and GatsbyJS
    • 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

Backends

EdgeOne Pages supports various popular backend frameworks to optimize your backend development and operation experience. We offer high-quality support for mainstream backend frameworks, and in many cases, you do not need any initial configuration to complete the deployment.

To help you get started faster, we provide some ready-made templates. You can create a project with one-click deployment to build your applications.

Next, we will show the basic configuration of each framework to help you quickly deploy on Pages.


Express.js

Express.js is a Node.js-based Web application framework with a set of powerful features to build single-page, multi-page, and hybrid Web applications. It is known for its flexibility and minimalistic feature, allowing developers to select components based on project requirements.

Note:
The built-in route of the Express framework is mounted to the configured routing of node-functions by default, and the entry function file name must be in the format [[]], such as [[default]].js.

Refer to the following example to quickly create an Express.js app:
// ./node-functions/express/[[default]].js

import express from "express";
const app = express();

app.use((req, res, next) => {
console.log(`[Log] ${req.method} ${req.url}`);
next();
});

app.get("/", (req, res) => {
res.json({ message: "Hello from Express on Node Functions!" });
});

export default app;

Ensure all dependencies are installed before deployment, and use edgeone pages dev to develop locally and test.


Koa.js

Koa.js is a next-generation Node.js Web framework developed by the Express team. It leverages async/await grammar and middleware to handle asynchronous operations in a more elegant way, thereby achieving simpler and more expressive code. Koa.js is more lightweight, with no middleware bundled, providing larger freedom.

Note:
The built-in route of the Koa framework is mounted to the configured routing of node-functions by default, and the entry function file name must be in the format [[]], such as [[default]].js.

Refer to the following example to quickly create a Koa.js app:
// ./node-functions/koa/[[default]].js
import Koa from 'koa';
import Router from '@koa/router';

const app = new Koa();
const router = new Router();

app.use(async (ctx, next) => {
const start = Date.now();
await next();
const ms = Date.now() - start;
ctx.set('X-Response-Time', `${ms}ms`);
});

router.get('/', async (ctx) => {
ctx.body = { message: 'Hello from Koa on Node Functions!' };
});

app.use(router.routes());
app.use(router.allowedMethods());

export default app;

Koa.js is suitable for backend services that require high customization and performance. Before deployment, please ensure all dependencies are installed and use edgeone pages dev to develop locally and test.