A quick reference for deploying a Node.js / Express API to Cloudflare Workers. Each section has a short note on what it does, then the commands.
Commands marked LIVE change the real running service. Everything else is safe to run.
Replace my-worker , my-account , and example.com with your own values.
Setup
Install dependencies and log in to Cloudflare. Login only connects the CLI to your account. It does not deploy anything.
node --version pnpm --version pnpm install pnpm add -D wrangler # if the project doesn't have it yet pnpm exec wrangler login pnpm exec wrangler whoami # confirm the right account
Enter fullscreen mode
Exit fullscreen mode
Minimal Express Worker
The smallest working example.…