Prerequisites
- A Cloudflare account
- Node.js 18 or later
- Wrangler is installed as a dev dependency — no separate install needed
Deploy
1
Clone the repository
2
Install dependencies
3
Authenticate with Cloudflare
If you have not already authenticated Wrangler with your Cloudflare account:
4
Deploy
wrangler deploy --minify src/index.ts, which bundles the gateway and publishes it to your Cloudflare Workers account. Wrangler prints the deployed URL on success.wrangler.toml
The repository includes awrangler.toml with pre-configured environments:
wrangler.toml
--env flag:
Notes
Cloudflare Workers run on the
workerd runtime. The gateway detects this at startup and enables the WebSocket realtime handler accordingly. Redis-backed caching is not available on Workers — use Cloudflare KV or Durable Objects for persistent state if needed.The
nodejs_compat compatibility flag is required. It enables Node.js built-ins that the gateway depends on.