Menu

Deploy Node.js & Express APIs to Cloudflare Workers: A Practical Command Cheat Sheet
📰

Deploy Node.js & Express APIs to Cloudflare Workers: A Practical Command Cheat Sheet

DEV Community: node·Safal Bhattarai·18 days ago
#lsHIEmiD
#devtonodejs#devto#dev#wrangler#enter
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.