expo-api-routes

Create typed Expo Router API routes for server-side processing.

1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/rostiSe/mymemory --skill expo-api-routes-rostise
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-api-routes
Source: https://github.com/rostiSe/mymemory/tree/main/.agents/skills/expo-api-routes
Command: npx skills add https://github.com/rostiSe/mymemory --skill expo-api-routes-rostise

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Expo Router API routes provide a secure, scalable pattern for performing server-side tasks in mobile apps, protecting secrets and enabling data access control without leaking keys to clients.

Core Features & Use Cases

  • File Structure: API routes live in app/api with +api.ts handlers to map HTTP methods to server-side logic.
  • HTTP Methods & Request Handling: Support typed GET/POST/PUT/DELETE handlers, process query parameters, headers, and JSON bodies, and implement error handling and CORS.
  • Deployment & Testing: Local testing with expo serve and deployment to EAS Hosting (Cloudflare Workers) with environment variables and domain configuration.

Quick Start

Start by creating a simple API route such as app/api/hello+api.ts and implement a GET handler that returns a hello message.

Frequently Asked Questions about expo-api-routes

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

FAQPage Schema
How do I secure API keys and database operations in Expo Router?

Expo API routes secure server-side operations by running code in isolated handlers, preventing secrets and database access keys from leaking to the mobile client. Typed request handlers process logic securely within the /api/* directory.

Can I use Expo API routes to proxy external API requests?

Yes, Expo API routes support external API proxy capabilities. You can route requests through server-side handlers to interact with external services while keeping sensitive environment variables and API keys hidden from the client.

How do I set up HTTP method handlers in Expo API routes?

You set up HTTP method handlers by creating files with the +api.ts extension in the app/api directory. This maps typed GET, POST, PUT, and DELETE requests to specific server-side logic, supporting dynamic routes and JSON bodies.

Does EAS Hosting support deploying Expo API routes with environment variables?

Yes, EAS Hosting supports deploying Expo API routes and allows configuration of environment variables and domains. You can test API routes locally using expo serve before deploying to Cloudflare Workers.

How do I handle CORS and error handling in Expo API routes?

Expo API routes enable you to implement CORS and error handling directly within your typed request handlers. This ensures secure data access control and proper server-side validation across your /api/* routes.