expo-api-routes
Guidelines for creating API routes in Expo Router with EAS Hosting
npx skills add sickn33/agentic-awesome-skills --skill expo-api-routes --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## When to Use API Routes Use API routes when you need: - **Server-side secrets** — API keys, database credentials, or tokens that must never reach the client - **Database operations** — Direct database queries that shouldn't be exposed - **Third-party API proxies** — Hide API keys when calling external services (OpenAI, Stripe, etc.) - **Server-side validation** — Validate data before database writes - **Webhook endpoints** — Receive callbacks from services like Stripe or GitHub - **Rate limiting** — Control access at the server level - **Heavy computation** — Offload processing that would be slow on mobile ## When NOT to Use API Routes Avoid API routes when: - **Data is already public** — Use direct fetch to public APIs instead - **No secrets required** — Static data or client-safe operations - **Real-time updates needed** — Use WebSockets or services like Supabase Realtime - **Simple CRUD** — Consider Firebase, Supabase, or Convex for managed backends - **File uploads** — Use direct-to-storage uploads (S3 presigned URLs, Cloudflare R2) - **Authentication only** — Use Clerk, Auth0, or Firebase Auth instead ## File Structure API routes live in the `app` directory with `+api.ts` su
- When to Use API Routes
- When NOT to Use API Routes
- File Structure
- Basic API Route
- HTTP Methods
- Dynamic Routes
- Request Handling
- Query Parameters
- Headers
- JSON Body
- Environment Variables
- CORS Headers
- Error Handling
- Testing Locally
npx expo serve
curl http://localhost:8081/api/hello
curl -X POST http://localhost:8081/api/users -H "Content-Type: application/json" -d '{"name":"Test"}'
npm install -g eas-cli
eas login
eas deploy
Create a secret
eas env:create --name OPENAI_API_KEY --value sk-xxx --environment production
Or use the Expo dashboardWhat does the expo-api-routes skill do?
Guidelines for creating API routes in Expo Router with EAS Hosting
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill expo-api-routes --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.