expo-api-routes

Implement secure Expo Router API routes with environment variables and Cloudflare Workers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides clear, practical guidelines for implementing server-side API routes in Expo Router and deploying them with EAS Hosting, preventing accidental exposure of secrets and ensuring reliable server-side behavior for mobile apps.

Core Features & Use Cases

  • Server-side secrets: Keep API keys, database credentials, and tokens out of client bundles using environment variables and protected endpoints.
  • Routing & handlers: Explains file naming conventions, HTTP method exports, query and body parsing, and dynamic route parameters for Expo Router.
  • Deployment & runtime considerations: Covers EAS Hosting deployment, Cloudflare Workers limitations, CORS headers, error handling, and recommended database options.
  • Use Case: Create a protected /api/ai endpoint that validates requests, proxies calls to an external AI provider using a server-side key, and returns sanitized JSON to the client.

Quick Start

Create an app/api/hello+api.ts that exports a GET handler returning JSON, set required environment variables locally and in EAS, and deploy with eas deploy.

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 to handle secrets?

To create server-side API routes in Expo Router, you add files like app/api/hello+api.ts that export HTTP method handlers. This approach keeps server-side secrets, API keys, and database credentials out of client bundles by using environment variables and protected endpoints.

How do I deploy Expo Router API routes to EAS Hosting?

You deploy Expo Router API routes to EAS Hosting by setting required environment variables locally and in EAS, then executing eas deploy. This ensures reliable server-side behavior for mobile apps running on the EAS platform.

Does Expo Router API routing work with Cloudflare Workers?

Yes, Expo Router API routing works with Cloudflare Workers, but requires awareness of specific runtime limitations. The guidelines cover CORS headers, error handling, and recommended database options to ensure compatibility within the Cloudflare Workers environment.

How do I handle CORS and HTTP method exports in Expo API routes?

To handle CORS and HTTP methods in Expo API routes, you export specific HTTP method handlers and configure CORS headers within your route files. The guidelines cover request parsing, dynamic route parameters, and error handling conventions.

How do I proxy third-party API calls securely using Expo server-side endpoints?

To proxy third-party API calls securely, you create a protected /api endpoint that validates requests, proxies calls to an external provider using a server-side key, and returns sanitized JSON to the client. This keeps sensitive tokens out of the mobile app bundle.

What are the limitations of running Expo API routes on Cloudflare Workers?

Running Expo API routes on Cloudflare Workers involves specific runtime limitations affecting database access and heavy computations. The guidelines address these constraints by recommending compatible database options and proper error handling patterns for the edge environment.