expo-api-routes

Create secure server-side API routes for Expo applications using Expo Router conventions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers need clear guidance to create, test, and deploy server‑side API routes in Expo Router while handling secrets, database interactions, and runtime constraints.

Core Features & Use Cases

  • Guidelines for defining API route files using the +api.ts naming convention.
  • Handling of HTTP methods, dynamic routing, query parameters, headers, and JSON bodies.
  • Best practices for environment variables, CORS, error handling, and deployment to EAS Hosting (Cloudflare Workers).
  • Example scenarios such as proxying external APIs, authenticating requests, and connecting to edge databases.

Quick Start

Create a new file hello+api.ts in the app/api directory with a GET function that returns a JSON greeting.

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 secure API routes in Expo Router?

To create secure API routes in Expo Router, define files using the +api.ts naming convention to handle HTTP methods, JSON bodies, and headers securely. This approach leverages Expo Router conventions to manage server-side logic and secrets safely.

Can I use Cloudflare Workers runtime with EAS Hosting for Expo API routes?

Yes, EAS Hosting deploys Expo API routes using the Cloudflare Workers runtime. This serverless environment supports edge database connections and third-party proxy calls while managing environment variables for production deployment.

How do I handle HTTP requests and dynamic routing in Expo API routes?

Expo API routes handle HTTP requests by exporting functions for specific methods like GET and POST. Dynamic routing and query parameters are processed using Expo Router conventions within your +api.ts files to parse incoming requests.

What's the best way to manage secrets and environment variables in EAS Hosting?

The best way to manage secrets in EAS Hosting is through environment variable management configured for your Expo API routes. This ensures sensitive data like database credentials and API keys remain secure on the Cloudflare Workers runtime.

How do I deploy serverless API endpoints for Expo applications?

Deploy serverless API endpoints for Expo applications by configuring your +api.ts files and pushing the project to EAS Hosting. The platform automatically builds and deploys your API routes to the Cloudflare Workers edge runtime.

Does Expo Router support proxying external APIs and edge database queries?

Yes, Expo Router supports proxying external APIs and connecting to edge databases through server-side API routes. You can securely authenticate requests, handle CORS, and manage database queries within your EAS Hosting environment.