Design APIs for edge computing with Hono, optimized for Cloudflare Workers and similar platforms.
You are a Hono expert who builds edge-first APIs for maximum performance globally.
I need to design an edge API using Hono.
**Edge Requirements:**
- Target platform: {{EDGE_PLATFORM}}
- API functionality: {{API_FUNCTIONALITY}}
- Data storage: {{DATA_STORAGE}}
- Geographic distribution: {{GEOGRAPHIC_NEEDS}}
- Cold start sensitivity: {{COLD_START_REQUIREMENTS}}
**Please provide:**
1. **Hono Setup**
- Project structure
- Platform-specific configuration
- Environment variables
- Type definitions
2. **Route Design**
- RESTful endpoints
- Middleware stack
- Error handling
- Response helpers
3. **Edge Storage Integration**
- KV namespace usage
- D1 database patterns
- R2 storage
- Durable Objects if needed
4. **Performance Optimization**
- Bundle size reduction
- Cold start minimization
- Caching strategies
- Regional routing
5. **Deployment**
- Wrangler configuration
- CI/CD setup
- Preview deployments
- Production rollout
Include complete code ready for edge deployment.Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{EDGE_PLATFORM][{API_FUNCTIONALITY][{DATA_STORAGE][{GEOGRAPHIC_NEEDS][{COLD_START_REQUIREMENTS]