Overview
Deploy your Conductor project to Cloudflare’s global edge network in minutes. This guide covers local development, production deployment, environment configuration, and monitoring.Prerequisites
- Node.js 18+ installed
- Cloudflare account (free tier works)
- Wrangler CLI installed
Local Development
Start Development Server
http://localhost:8787
Test Locally
Local Environment Variables
Create.dev.vars for local secrets:
.gitignore:
Production Deployment
1. Login to Cloudflare
2. Configure wrangler.toml
3. Create Resources
4. Set Secrets
5. Deploy
Environment Configuration
Multiple Environments
Use different wrangler files:Environment Variables
Custom Domains
1. Add Domain in Dashboard
- Go to Workers & Pages
- Select your Worker
- Click “Triggers” tab
- Click “Add Custom Domain”
- Enter your domain (e.g.,
api.example.com)
2. Update DNS
Cloudflare automatically configures DNS for domains managed by Cloudflare. For external domains, add CNAME:3. Test
CI/CD Integration
GitHub Actions
GitLab CI
Monitoring
View Logs
Analytics
View in Cloudflare dashboard:- Workers & Pages
- Select your Worker
- Click “Metrics” tab
- Requests per second
- Success rate
- CPU time
- Duration
- Errors
Custom Logging
Error Tracking
Performance Optimization
Enable Caching
Use AI Gateway
Optimize Bundle Size
Monitor Performance
Scaling
Automatic Scaling
Cloudflare Workers scale automatically:- No configuration needed
- Handle millions of requests
- Pay only for what you use
Rate Limiting
Troubleshooting
Check Deployment Status
View Worker Details
Test Production Endpoint
Common Issues
”Module not found”
Solution: Build the project first”Binding not found”
Solution: Create and configure binding in wrangler.toml”Secret not set”
Solution: Set the secretBest Practices
- Use secrets for sensitive data - Never commit API keys
- Test locally first - Use
npm run devbefore deploying - Enable caching - Reduce costs and improve performance
- Monitor logs - Watch for errors and performance issues
- Use custom domains - Professional URLs for production
- Set up CI/CD - Automate deployments
- Tag deployments - Use git tags for releases
- Test in staging - Deploy to dev environment first

