expo-api-routes

Create server-side API routes for Expo Router in EAS Hosting.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/infinite-loop-factory/app-factory --skill expo-api-routes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-api-routes
Source: https://github.com/infinite-loop-factory/app-factory/tree/main/.agents/skills/expo-api-routes
Command: npx skills add https://github.com/infinite-loop-factory/app-factory --skill expo-api-routes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a streamlined approach to creating server-side API routes for Expo Router within an EAS-hosted environment. It helps developers separate secure backend logic from client code and simplifies endpoint management for mobile apps.

Core Features & Use Cases

  • Expo Router API Routes: Define API endpoints under app/api with +api.ts suffix, following the standard HTTP method exports (GET, POST, PUT, DELETE).
  • Secure, Server-Side Logic: Keep secrets and sensitive operations on the server, away from the client, with environment variable support.
  • Deployment & Local Testing: Test locally with expo serve and deploy routes to EAS Hosting for production.

Quick Start

  • Create a new API route file at app/api/hello+api.ts with a simple GET handler.
  • Access the route from the client at /api/hello and verify the 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 create server-side API routes in Expo Router?

Server-side API routes in Expo Router are created by defining TypeScript files with a +api.ts suffix under the app/api directory. You export standard HTTP method handlers like GET, POST, PUT, and DELETE to process incoming requests and return responses directly within your Expo application structure.

Can I keep sensitive secrets and environment variables secure in Expo API routes?

Expo API routes keep sensitive secrets and environment variables secure by executing logic on the server side within EAS Hosting. This separates secure backend operations from client code, ensuring secrets are never exposed to the mobile client environment.

What is the best way to test Expo API routes locally before EAS Hosting deployment?

The best way to test Expo API routes locally is by using the expo serve command. This allows you to verify endpoint responses and data handling during development before deploying the server-side logic to production EAS Hosting environments.

Does EAS Hosting support external service proxies via Expo API routes?

EAS Hosting supports external service proxies through Expo API routes by handling secure data fetching and server-side logic. This allows your Expo application to securely communicate with external services without exposing sensitive API keys or operations to the mobile client.

Why do my Expo API routes require TypeScript in the +api.ts files?

Expo API routes require TypeScript in +api.ts files to ensure robust type safety for server-side data handling and HTTP method exports. This enforces strict typing for secure endpoints and environment variable configurations across development and production environments.