expo-api-routes

Create and deploy serverless API routes in Expo Router with EAS Hosting.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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

Core Features & Use Cases

  • Server-Side Logic: Implement secure API endpoints for tasks like managing secrets, interacting with databases, and proxying third-party APIs.
  • Expo Router Integration: Learn the file-based routing conventions for API routes (+api.ts).
  • Deployment: Understand how to deploy these routes using EAS Hosting (Cloudflare Workers).
  • Use Case: Securely fetch data from a private database or process user input on the server without exposing sensitive keys or logic to the client.

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 create serverless API routes in an Expo Router application?

You can create serverless API routes in Expo Router by defining HTTP methods and handling request/response objects within a `+api.ts` file. This enables server-side logic like managing secrets and database operations securely.

How does EAS Hosting handle deploying Expo API routes?

EAS Hosting deploys Expo API routes using the Cloudflare Workers runtime. This allows your serverless endpoints to run globally at the edge, though you must account for specific runtime limitations during development.

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

Yes, you can securely manage secrets in Expo API routes using environment variables. This keeps sensitive data like database credentials and private API keys hidden from the client-side bundle.

What limitations apply when building serverless APIs with Expo Router on Cloudflare Workers?

The Cloudflare Workers runtime imposes specific limitations on Expo API routes, affecting how long-running processes and certain Node.js modules operate. You must design endpoints to fit within these edge computing constraints.

Does Expo Router support authentication middleware for API routes?

Yes, Expo Router supports implementing authentication middleware for API routes. You can intercept requests to verify user credentials before processing dynamic routes or proxying external APIs.

What is the best way to proxy external APIs using Expo API routes?

The best way to proxy external APIs with Expo API routes is to securely handle the request on the server, append your secret keys via environment variables, and return the fetched response to your client application.