What problem does it solve?
This Skill provides clear, practical guidelines for implementing server-side API routes in Expo Router and deploying them with EAS Hosting, preventing accidental exposure of secrets and ensuring reliable server-side behavior for mobile apps.
Core Features & Use Cases
- Server-side secrets: Keep API keys, database credentials, and tokens out of client bundles using environment variables and protected endpoints.
- Routing & handlers: Explains file naming conventions, HTTP method exports, query and body parsing, and dynamic route parameters for Expo Router.
- Deployment & runtime considerations: Covers EAS Hosting deployment, Cloudflare Workers limitations, CORS headers, error handling, and recommended database options.
- Use Case: Create a protected /api/ai endpoint that validates requests, proxies calls to an external AI provider using a server-side key, and returns sanitized JSON to the client.
Quick Start
Create an app/api/hello+api.ts that exports a GET handler returning JSON, set required environment variables locally and in EAS, and deploy with eas deploy.