This guide covers deploying FixFX Links to Cloudflare Workers.
- Cloudflare account at https://dash.cloudflare.com
- Workers enabled on your account
- Wrangler CLI installed globally:
npm install -g wrangler - Domain registered (for production deployment)
wrangler loginThis will open a browser to grant Wrangler access to your Cloudflare account.
Update the wrangler.toml file with your settings:
account_id = "your-account-id" # Found in Cloudflare dashboardFor production with a custom domain:
[env.production]
name = "fixfx-links-prod"
routes = [
{ pattern = "links.fixfx.wiki", zone_name = "fixfx.wiki" }
]Replace links.fixfx.wiki and fixfx.wiki with your actual domain.
Deploy to the default development environment:
bun run deployOr deploy to production:
bun run deploy -e productionThe site will be available at:
- Development:
https://fixfx-links.workers.dev - Production:
https://links.fixfx.wiki(if configured)
To set environment variables for your Workers:
wrangler secret put VARIABLE_NAMEThen access in your code:
const value = process.env.VARIABLE_NAMEView real-time logs:
wrangler tailView in Cloudflare dashboard:
- Log in to https://dash.cloudflare.com
- Go to Workers > your-project > Logs
To use a custom domain with Cloudflare Workers:
- Buy domain through Cloudflare or point nameservers to Cloudflare
- Update
wrangler.tomlwith route configuration - Redeploy:
bun run deploy -e production - Navigate to your domain in Cloudflare dashboard and verify Workers route
Cloudflare Workers provides built-in optimizations:
- Global edge network distribution
- Automatic gzip compression
- HTTP/2 and HTTP/3 support
- Automatic HTTPS with free SSL
Run wrangler login again to re-authenticate.
Ensure all dependencies are installed:
bun installCheck Workers dashboard for errors:
- https://dash.cloudflare.com
- Workers > fixfx-links > Deployments
Verify in Cloudflare dashboard:
- Domain is using Cloudflare nameservers
- Workers route matches your domain exactly
- SSL/TLS is set to "Full" or better
To rollback to a previous deployment:
- Go to Cloudflare dashboard
- Workers > fixfx-links > Deployments
- Click the deployment you want to rollback to
- Click "Rollback"
Test the production build locally:
bun run build
bun run startThen visit http://localhost:3000
- Cloudflare Workers Docs: https://developers.cloudflare.com/workers/
- Wrangler CLI Docs: https://developers.cloudflare.com/workers/wrangler/
- TanStack Start Deployment: https://tanstack.com/start/latest/docs/framework/react/guide/deploying