For Node.js
Node.js apps, properly hosted
Free to sign up. No egress fees on any product.
Why Node.js on Edge
A long-running process is still the best default
Any framework, any runtime
Express, Fastify, Hono, NestJS, Koa, AdonisJS or plain http. If it runs on Node it runs here, and Bun and Deno work too.No cold starts
A real process on a real VM. Latency stays consistent, and there's no per-invocation meter running in the background.S3-compatible storage
Use the AWS SDK or any S3 client for uploads and downloads. The same code runs against Edge Storage in dev and production.Image transforms via URL
Hand resizing, cropping and format conversion to the CDN. Your Node process stays small and never touches sharp.Global CDN, zero egress
Static files and cacheable GET routes are served from 988 locations. Your app only sees the dynamic traffic.Plain Linux deploys
systemd, PM2, Docker or Kamal: your choice. The Edge CLI provisions the VM and you decide how to ship to it.
Reference architecture
How a Node app maps to Edge
Clients
browsers, apps, webhooks
api.acme.dev
caches cacheable GETs
node dist/server.js
PM2 cluster · Nginx
postgres :5432
state, on its own VM
redis :6379
sessions and rate limits
acme-files
uploads and backups
- Compute
Runs your Node process under PM2, systemd or Docker.
- Storage
Holds uploads, exports and backups behind the S3 API.
- CDN
Caches static files and GET responses that send cacheable headers.
- Image optimisation
Resize, crop and AVIF/WebP conversion from the URL.
- DNS
Anycast DNS for production, staging and preview hostnames.
- Shield
Scores any POST with one fetch from your middleware.
- Assist
An answer box grounded in your pages, from one script tag in the layout.
Deploy
From npm run build to live in four steps
- 01
Create a VM with Node
The nodejs library script installs Node 22 LTS, PM2 and an Nginx reverse proxy on first boot.
shell$ edge compute create --name api --size s-2vcpu-4gb \ --image ubuntu-24 --region london --script nodejs \ --script-param node_version=22 - 02
Connect to Edge Storage
The official AWS SDK works unchanged. Only the endpoint and path-style addressing differ.
src/storage.tsimport { S3Client, PutObjectCommand } from '@aws-sdk/client-s3' export const s3 = new S3Client({ endpoint: 'https://storage.edge.network', region: 'us-east-1', forcePathStyle: true, credentials: { accessKeyId: process.env.EDGE_ACCESS_KEY!, secretAccessKey: process.env.EDGE_SECRET_KEY!, }, }) export const upload = (Key: string, Body: Buffer) => s3.send(new PutObjectCommand({ Bucket: 'acme-files', Key, Body })) - 03
Keep it running with PM2
pm2 reload gives zero-downtime restarts across both instances. Run pm2 startup once so it survives reboots.
ecosystem.config.cjsmodule.exports = { apps: [{ name: 'api', script: 'dist/server.js', instances: 2, exec_mode: 'cluster', env: { NODE_ENV: 'production', PORT: 3000 }, }], } - 04
Front it with the CDN
Only GET responses with a cacheable Cache-Control header are cached. POSTs, errors and anything with Set-Cookie go straight to your process.
shell$ edge cdn create --name acme-api $ edge cdn domains add cdn-72e9b3 \ --domain api.acme.dev \ --origin https://<vm-ip>
Prefer to hand it off? Give the job to your AI agent or have our engineers do it.
What it costs
Priced by the server, not the invocation
- No per-invocation or per-GB-second pricing
- No egress fees on responses or downloads
- Resize the VM with one command as traffic grows
- Billed hourly from a prepaid balance, with optional hard caps
Estimated monthly bill on Edge
API and web app · 10.5M requests a month · 25 GB of files
- Compute$19.24Standard VM · 2 vCPU · 4 GiB · 80 GB NVMe
- CDN$2.5010.5M requests: first 500k free, 10M × $0.25 per million
- Storage$0.3025 GB of files: first 5 GB free, 20 GB × $0.015
- DNS$0.00Production, staging and preview records
- Egress$0.00
FAQ
Node.js on Edge, answered
Express, Fastify, Hono or NestJS: which works best?
Can I use TypeScript?
What about Bun or Deno?
Will the CDN cache my API?
How do I scale horizontally?
Drop-in services
Add these without touching the stack
- Edge ShieldBot protection
POST /siteverify → score: 94Score any POST with one fetch from Express, Fastify or Hono middleware. Free for most sites.
Free for most sites. No puzzles, no widget to style.Explore - Edge AssistAI answers
<script src="…/assist.js">Serve the widget from your layout, and answers come from your site's own pages.
Free tier: 250 answered questions a monthExplore
Ship your Node app on Edge
Any framework, any runtime, any deploy strategy.
Free tiers hard-cap. Nothing bills until you add a card.