expo-api-routes

Implement serverless API routes in Expo Router apps with TypeScript.

1|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/luthebao/expo-template --skill expo-api-routes-luthebao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-api-routes
Source: https://github.com/luthebao/expo-template/tree/main/.claude/skills/expo-api-routes
Command: npx skills add https://github.com/luthebao/expo-template --skill expo-api-routes-luthebao

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 directly within your Expo Router application, enabling you to handle sensitive data, database operations, and external API integrations securely.

Core Features & Use Cases

  • Secure Data Handling: Implement server-side logic for API keys, database credentials, and sensitive operations.
  • Dynamic Routing: Define routes with parameters to handle specific resources.
  • HTTP Method Support: Easily implement GET, POST, PUT, DELETE, and OPTIONS requests.
  • Environment Variable Management: Securely manage secrets for local development and production deployment.
  • Deployment to EAS Hosting: Deploy your API routes as serverless functions on Cloudflare Workers.
  • Use Case: Securely proxy requests to a third-party API (like OpenAI) by embedding your API key in the server-side route, preventing client-side exposure.

Quick Start

Use the expo-api-routes skill to create a GET request handler for the '/api/hello' endpoint.

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?

To create serverless API routes in Expo Router, define HTTP method handlers like GET or POST within your application directory using TypeScript. This allows you to securely handle server-side logic, dynamic routing, and sensitive data operations directly inside your Expo app.

Can I hide API keys and handle sensitive credentials using Expo API routes?

Yes, you can hide API keys and manage sensitive credentials using Expo API routes. The Skill guides you through securely managing environment variables for secrets and proxying third-party requests, preventing client-side exposure of your API keys during local development and production.

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

You can deploy Expo Router API routes to EAS Hosting by configuring your serverless functions for the Cloudflare Workers runtime. The Skill provides deployment guidelines to publish your HTTP request handlers as serverless APIs on the EAS infrastructure.

What are the limitations of using Cloudflare Workers for Expo API routes?

The Cloudflare Workers runtime has specific limitations when running Expo API routes, particularly regarding database connectivity. The Skill addresses these edge cases and suggests alternative database solutions that are compatible with the serverless environment.

Does Expo Router support defining HTTP methods like GET and POST for APIs?

Yes, Expo Router supports defining HTTP methods like GET, POST, PUT, DELETE, and OPTIONS for APIs. The Skill demonstrates how to implement these request handlers and manage dynamic routing parameters to handle specific server-side resources.

When should I use serverless API routes instead of client-side API calls in Expo?

You should use serverless API routes instead of client-side API calls when handling sensitive data, database operations, or external API integrations securely. This approach proxies requests through your server to prevent exposing API keys or database credentials on the client side.