eas-hosting

Deploy Expo web apps and API routes to EAS Hosting on Cloudflare Workers.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/CYRUS-pinto/pi-bot --skill eas-hosting-cyrus-pinto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: eas-hosting
Source: https://github.com/CYRUS-pinto/pi-bot/tree/main/.agents/skills/eas-hosting
Command: npx skills add https://github.com/CYRUS-pinto/pi-bot --skill eas-hosting-cyrus-pinto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Deploying an Expo web app and its server-side API routes requires configuring hosting, environment secrets, custom domains, and understanding edge runtime constraints. This Skill guides the full workflow of exporting the web bundle, deploying to EAS Hosting, and authoring Expo Router API routes that run on Cloudflare Workers. ## Core Features & Use Cases - Web and API Deployment: Export the web bundle with npx expo export -p web and ship production or PR preview deploys with eas deploy. - API Route Authoring: Create +api.ts handlers with HTTP methods, dynamic routes, request parsing, CORS, and error handling. - Runtime Guidance: Work within Cloudflare Workers limitations using Web APIs, edge databases like Turso or D1, and environment secrets via eas env:create. - Use Case: You built an Expo app that needs a server endpoint to call the OpenAI API without exposing your key. Create app/api/ai+api.ts, store the key as an EAS environment secret, and deploy both the site and the route with one eas deploy --prod command. ## Quick Start Use the eas-hosting skill to deploy my Expo web app and its API routes to EAS Hosting production.

Frequently Asked Questions about eas-hosting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy an Expo web app to EAS Hosting?

Export the web bundle with npx expo export -p web, then run npx eas-cli@latest deploy for a preview or add --prod for production. The same command deploys any Expo Router API routes bundled alongside the site.

How do I create API routes in Expo Router?

Create files with the +api.ts suffix inside the app directory, such as app/api/hello+api.ts, and export named functions for each HTTP method like GET or POST. Dynamic segments use bracket syntax like app/api/users/[id]+api.ts.

Does EAS Hosting support Node.js APIs like fs?

No, API routes on EAS Hosting run on Cloudflare Workers, so the fs module and native Node modules are unavailable. Use Web APIs like fetch and crypto.subtle instead, and connect to cloud databases such as Turso, D1, or Neon.

How do I set environment variables for EAS Hosting?

Use eas env:create with a name, value, and environment flag, or configure secrets through the Expo dashboard. Locally, place variables in a .env file and access them in API routes via process.env.

When should I not use Expo Router API routes?

Avoid API routes for public data that needs no secrets, real-time updates requiring WebSockets, simple CRUD better served by Supabase or Firebase, and file uploads that should go directly to storage like S3 or Cloudflare R2.