expo-api-routes

Develop serverless API routes in Expo Router with TypeScript.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance on creating and deploying serverless API routes within an Expo Router application, enabling developers to build backend functionality directly within their frontend project.

Core Features & Use Cases

  • Server-Side Logic: Implement secure server-side operations like handling secrets, database interactions, and third-party API proxies.
  • Expo Router Integration: Learn the file structure and conventions for defining API routes using the +api.ts suffix.
  • Deployment: Understand how to deploy these API routes using EAS Hosting and manage environment variables for production.
  • Use Case: Securely handle Stripe webhooks or proxy requests to an external AI service by creating API routes in your Expo app.

Quick Start

Create a new API route by adding a file named hello+api.ts inside your app/api/ directory with the content export function GET(request: Request) { return Response.json({ message: "Hello from Expo!" }); }.

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 Expo Router?

You can build serverless API routes in Expo Router by creating TypeScript files with the `+api.ts` suffix inside your `app/api/` directory, then exporting HTTP method handlers like `GET` that manipulate Request and Response objects.

Can I use Expo Router API routes to proxy external APIs and manage server-side secrets?

Yes, Expo Router API routes support secure server-side operations like managing environment secrets, interacting with databases, and proxying external APIs, allowing you to build backend logic directly within your frontend project.

How do I deploy Expo API routes to EAS Hosting?

Deploy Expo API routes to EAS Hosting by configuring your project and managing production environment variables, which provisions your serverless functions while handling runtime limitations inherent to the Cloudflare Workers environment.

Does Expo Router support handling webhooks like Stripe integrations?

Yes, Expo Router supports handling webhooks such as Stripe integrations by defining specific API routes that securely process incoming HTTP requests, manage payload validation, and handle error responses on the server side.

What are the runtime limitations of serverless API routes on EAS Hosting?

Serverless API routes on EAS Hosting operate within the Cloudflare Workers environment, meaning they have specific runtime limitations and execution constraints that require careful handling of long-running processes and Node.js module compatibility.