Loading...
Loading...
This skill guides development of full-stack features on EdgeOne Pages — Edge Functions, Cloud Functions (Node.js / Go / Python runtimes), Middleware, KV Storage, and local dev workflows. It should be used when the user wants to create APIs, serverless functions, middleware, WebSocket endpoints, or full-stack features specifically on EdgeOne Pages — e.g. "create an API", "add a serverless function", "write middleware", "build a full-stack app", "add WebSocket support", "set up edge functions", "use KV storage", "create a Go API", "build a Python backend", "use Flask/FastAPI/Gin on EdgeOne Pages". Do NOT trigger for framework-native features (Next.js API routes, Next.js middleware, Nuxt server routes) or generic Express/Koa development outside an EdgeOne Pages project. Do NOT trigger for deployment — use edgeone-pages-deploy instead. Do NOT trigger for other platforms (Cloudflare Workers, Vercel Functions, AWS Lambda).
npx skill4agent add tencentedgeone/edgeone-pages-skills edgeone-pages-devedgeone-pages-deploymiddleware.jsfspathcryptocloud-functions/.js.ts.go.pyResponseres.send()[[default]].jshttp.HandlerFuncclass handler(BaseHTTPRequestHandler)app = Flask(...)app = FastAPI(...).pyedgeone pages devedgeone pages devdevCommandedgeone.jsondevpackage.jsonmiddleware.jsRequest interception / redirect / rewrite / auth guard / A/B test?
→ Middleware → read references/middleware.md
Lightweight API with ultra-low latency (simple logic, no npm)?
→ Edge Functions → read references/edge-functions.md
KV persistent storage? (⚠️ enable KV in console first)
→ Edge Functions + KV Storage → read references/kv-storage.md
Complex backend with npm packages / database / WebSocket?
→ Cloud Functions (Node.js) → read references/node-functions.md
Express or Koa framework?
→ Cloud Functions (Node.js) with [[default]].js → read references/node-functions.md
High-performance API with Go (Gin / Echo / Chi / Fiber)?
→ Cloud Functions (Go) → read references/go-functions.md
Python API with Flask / FastAPI / Django / Sanic?
→ Cloud Functions (Python) → read references/python-functions.md
Pure static site with no server-side logic?
→ No functions needed — just deploy static files
Need a project structure template?
→ read references/recipes.md| Feature | Edge Functions | Cloud Functions (Node.js) | Cloud Functions (Go) | Cloud Functions (Python) | Middleware |
|---|---|---|---|---|---|
| Runtime | V8 (like CF Workers) | Node.js v20.x | Go 1.26+ | Python 3.10 | V8 (edge) |
| npm/packages | ❌ Not supported | ✅ Full npm ecosystem | ✅ Go modules | ✅ pip (auto-detect) | ❌ Not supported |
| Max code size | 5 MB | 128 MB | 128 MB | 128 MB (incl. deps) | Part of edge bundle |
| Max request body | 1 MB | 6 MB | 6 MB | 6 MB | N/A (passes through) |
| Max CPU / wall time | 200 ms CPU | 120 s wall clock | 120 s wall clock | 120 s wall clock | Lightweight only |
| KV Storage | ✅ Yes (global variable) | ❌ No | ❌ No | ❌ No | ❌ No |
| WebSocket | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |
| Framework support | — | Express, Koa | Gin, Echo, Chi, Fiber | Flask, FastAPI, Django, Sanic | — |
| Use case | Lightweight APIs, edge compute | Complex APIs, full-stack | High-perf APIs, compiled speed | Data science, ML, rapid prototyping | Request preprocessing |
| Feature | Node.js | Go | Python |
|---|---|---|---|
| File extension | | | |
| Handler style | | | |
| Framework mode | Express/Koa via | Gin/Echo/Chi/Fiber via entry | Flask/FastAPI/Django via entry |
| Dependency management | | | |
| Dev modes | Handler / Framework | Handler / Framework | Handler / WSGI / ASGI |
| Task | Read |
|---|---|
| Edge Functions (lightweight APIs, V8 runtime, KV Storage) | references/edge-functions.md |
| KV Storage (persistent key-value storage on edge) | references/kv-storage.md |
| Cloud Functions — Node.js (npm, database, Express/Koa, WebSocket) | references/node-functions.md |
| Cloud Functions — Go (Gin, Echo, Chi, Fiber, net/http) | references/go-functions.md |
| Cloud Functions — Python (Flask, FastAPI, Django, Sanic, Handler) | references/python-functions.md |
| Middleware (redirects, rewrites, auth guards, A/B testing) | references/middleware.md |
| Project structure templates and common recipes | references/recipes.md |
| Debugging and troubleshooting | references/troubleshooting.md |
edgeone pages initedgeone pages dev # Serves everything on http://localhost:8088/edgeone pages linkedgeone pages env pull # Pull from console to local .envcontext.env.KEYos.Getenv("KEY")os.environ.get("KEY")