What problem does it solve?
This guideline helps developers build secure, well-structured API routes for Expo Router using EAS Hosting, reducing the risk of exposed secrets and misconfigurations in server-side logic.
Core Features & Use Cases
- File Structure: API routes live in the app directory with +api.ts suffix and support for dynamic routes.
- Basic API Route patterns: GET, POST, PUT, DELETE with example collections and responses.
- Request Handling & Environment: Guidance on query parameters, headers, JSON bodies, and managing environment variables securely.
- Deployment & Runtime: Instructions for local testing and deploying API routes to EAS Hosting (Cloudflare Workers) with best practices.
- Client Integration: How to call these routes from client code and handle responses.
Quick Start
Create a new API route under app/api with the +api.ts suffix and test it locally.