expo-api-routes

Develop serverless API routes in Expo Router applications with TypeScript.

1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/salafidurus/salafi-audios --skill expo-api-routes-salafidurus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-api-routes
Source: https://github.com/salafidurus/salafi-audios/tree/main/apps/mobile/.opencode/skills/expo-api-routes
Command: npx skills add https://github.com/salafidurus/salafi-audios --skill expo-api-routes-salafidurus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidelines and best practices for developing secure and efficient API routes directly within your Expo Router application, enabling server-side logic without a separate backend.

Core Features & Use Cases

  • Server-Side Secrets Management: Securely handle API keys, database credentials, and other sensitive information.
  • Database Operations: Perform direct database queries and manipulations.
  • Third-Party API Integration: Proxy requests to external services while protecting your keys.
  • Webhook Endpoints: Create endpoints to receive callbacks from services like Stripe or GitHub.
  • Use Case: You need to integrate with a payment gateway using an API key that should never be exposed to the client. You can create an API route in Expo Router to handle the payment processing securely on the server.

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 build serverless API routes with Expo Router?

Build serverless API routes with Expo Router by creating TypeScript handlers in your app directory to process HTTP methods, dynamic routes, and request parameters. This enables server-side logic without needing a separate backend.

Can I use Expo Router to securely manage server-side API keys and database credentials?

Securely manage server-side API keys and database credentials in Expo Router by defining environment variables within your API routes. This keeps sensitive information and direct database operations completely hidden from the client.

What's the best way to handle CORS in Expo Router API routes?

Handle CORS in Expo Router API routes by configuring HTTP headers within your TypeScript request handlers. This ensures your serverless endpoints can securely accept cross-origin requests from your frontend application.

Does EAS Hosting have runtime limitations for Expo API routes?

EAS Hosting has specific runtime limitations for Expo API routes that affect how serverless functions execute. Understanding these constraints is necessary when implementing database integration or authentication middleware.

How do I create webhook endpoints for third-party services using Expo Router?

Create webhook endpoints in Expo Router by defining serverless API routes that securely receive and process callbacks from external services. This allows direct integration with platforms like Stripe or GitHub without exposing client keys.

Why should I use Expo Router API routes instead of a separate backend for proxying requests?

Use Expo Router API routes instead of a separate backend to securely proxy requests to external services. This approach protects your API keys server-side while maintaining a unified TypeScript codebase across your application.