expo-api-routes

Implement Expo Router API routes with EAS Hosting for server-side logic.

3|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/ravnhq/typescript-blueprint --skill expo-api-routes-ravnhq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-api-routes
Source: https://github.com/ravnhq/typescript-blueprint/tree/main/.agents/skills/expo-api-routes
Command: npx skills add https://github.com/ravnhq/typescript-blueprint --skill expo-api-routes-ravnhq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Expo apps often need server-side endpoints to handle secrets, validate requests, proxy external services, and protect API keys from client exposure. This guide shows how to structure and implement API routes in the app/api directory using +api.ts files, with proper HTTP methods, request handling, and error management.

Core Features & Use Cases

  • Server-side endpoints: Implement +api.ts handlers for GET, POST, PUT, DELETE to protect secrets and perform validations.
  • Request validation & security: Validate inputs, implement simple auth checks, and handle errors gracefully on the server.
  • Deployment readiness: Prepare routes for deployment to EAS Hosting and Cloudflare Workers, including environment config and runtime constraints.

Quick Start

Create a sample API route under app/api with a +api.ts file and run the local Expo server to verify routing.

Frequently Asked Questions about expo-api-routes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build secure server-side API routes in Expo?

You can build secure server-side API routes in Expo by creating +api.ts files under the app/api directory to handle HTTP methods, validate requests, and protect API keys from client-side exposure.

Can I use Expo Router for dynamic API routes and request validation?

Yes, Expo Router supports dynamic API routes and request validation by defining GET, POST, PUT, and DELETE handlers inside +api.ts files, enabling secure server-side data processing and input validation.

Does EAS Hosting support deploying Expo API routes to Cloudflare Workers?

Yes, EAS Hosting supports deploying Expo API routes to Cloudflare Workers, allowing you to execute server-side endpoints with proper environment variable configuration and runtime constraints for web and mobile apps.

How do I manage secrets and environment variables in Expo API routes?

You manage secrets and environment variables in Expo API routes by configuring them for EAS Hosting and Cloudflare Workers, ensuring sensitive API keys remain server-side only within your +api.ts endpoint handlers.

What are the limitations of using Expo API routes for server-side logic?

Limitations of Expo API routes include specific runtime constraints when deploying to Cloudflare Workers via EAS Hosting, requiring careful management of environment variables, CORS, and error handling within the server-side execution environment.