expo-api-routes

Develop API routes in Expo Router applications for EAS Hosting.

Updated Jan 17, 2026
One-click install
npx skills add https://github.com/epiphanyapps/mapyourhealth --skill expo-api-routes-epiphanyapps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-api-routes
Source: https://github.com/epiphanyapps/mapyourhealth/tree/main/.agents/skills/expo-api-routes
Command: npx skills add https://github.com/epiphanyapps/mapyourhealth --skill expo-api-routes-epiphanyapps

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidelines and examples for creating server-side API routes within an Expo Router application, enabling developers to handle sensitive data, database operations, and external API integrations securely.

Core Features & Use Cases

  • Server-Side Logic: Implement logic that should not run on the client, such as accessing secrets or performing complex computations.
  • API Integration: Securely proxy requests to third-party APIs, hiding sensitive keys.
  • Database Operations: Interact with databases directly from your Expo app's backend.
  • Use Case: Securely fetch data from a private API or process user submissions on the server before saving them to a database.

Quick Start

Use the expo-api-routes skill to create a GET endpoint at /api/hello that returns a JSON response.

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 serverless APIs with Expo Router?

Expo Router lets you build serverless APIs by creating route files to handle HTTP methods, parse JSON requests, and return responses. Deployed on EAS Hosting, these routes execute server-side logic securely without needing a separate backend repository.

Can I use environment variables for secrets in Expo API routes?

Expo API routes support environment variable management for secrets, allowing you to securely store API keys and database credentials on the server. This keeps sensitive data hidden from the client while remaining accessible during server-side execution.

What database options work with Expo Router on EAS Hosting?

Suggested cloud database options for Expo Router on EAS Hosting include Cloudflare D1, Turso, PlanetScale, Supabase, and Neon. You can connect to these databases directly from your API routes to perform secure server-side data operations.

Does EAS Hosting support CORS configuration for API routes?

Yes, EAS Hosting supports CORS configuration for Expo API routes. You can configure CORS headers within your Expo Router route handlers to control cross-origin requests, ensuring your serverless endpoints are securely accessible to authorized web clients.

What are the limitations of the Cloudflare Workers runtime in Expo API routes?

The Cloudflare Workers runtime in Expo API routes has specific limitations regarding Node.js compatibility, requiring alternative Web API usage for certain operations. You must account for these constraints when implementing complex server-side logic or proxying external APIs.

How do I proxy external APIs securely using Expo Router?

You can proxy external APIs securely using Expo Router by creating serverless API routes that forward client requests to third-party services. This pattern hides sensitive API keys within server-side environment variables, preventing client-side exposure.