api-routes

Create Expo Router API routes with EAS Hosting and Cloudflare Workers runtime.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/jp2507-max/growbro-cultivation-app --skill api-routes-jp2507-max
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-routes
Source: https://github.com/jp2507-max/growbro-cultivation-app/tree/main/.github/skills/api-routes
Command: npx skills add https://github.com/jp2507-max/growbro-cultivation-app --skill api-routes-jp2507-max

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a clear, repeatable pattern for building API routes in Expo Router with EAS Hosting, reducing misconfigurations and exposure of secrets.

Core Features & Use Cases

  • Structured API routing: Standardizes the app/api directory, HTTP method handlers, and error handling.
  • Security & best practices: Emphasizes protecting secrets, validating input, and avoiding client exposure of server logic.
  • Use Case: Ideal for mobile apps needing internal endpoints for data management or secure proxying to external services.

Quick Start

Create a sample API route under app/api, such as app/api/hello+api.ts, with a GET handler that returns a JSON payload at startup.

Frequently Asked Questions about 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?▼

Secure Expo API routes by placing endpoints under app/api and using standardized HTTP method handlers with error management. This pattern enforces best practices, preventing client-side secret exposure and ensuring compatibility with the Cloudflare Workers runtime.

What is the best way to manage environment variables in EAS Hosting serverless functions?▼

Manage environment variables in EAS Hosting by keeping them strictly within server-side API routes under app/api. This approach ensures no exposure of secrets on the client while maintaining compatibility with the serverless Cloudflare Workers runtime.

Does the Expo Router API routes pattern work with Cloudflare Workers?▼

Yes, the Expo Router API routes pattern explicitly works with Cloudflare Workers. It enforces best practices and secure defaults for server endpoints under app/api that are compatible with the EAS Hosting serverless runtime.

How do I handle dynamic routes and errors in Expo Router API endpoints?▼

Handle dynamic routes and errors in Expo API endpoints by applying a standardized structure under app/api. This pattern covers HTTP method handling and error management to ensure consistent server logic across your project.

Can I use Expo API routes to proxy requests to external services?▼

Yes, you can use Expo API routes to securely proxy requests to external services. This pattern provides a repeatable structure for internal endpoints, allowing mobile apps to manage data or securely proxy external requests without exposing secrets.

Why should I not expose server logic in my Expo mobile app client?▼

You should not expose server logic in the client to protect secrets and maintain secure defaults. This pattern standardizes server logic within app/api endpoints, ensuring sensitive operations remain isolated on the EAS Hosting server side.