Log in

expo-api-routes

Vercel
All-time installs
37.2K

API routes in Expo Router for server-side logic, secrets, and third-party integrations on EAS Hosting.

Other options

Summary

API routes in Expo Router for server-side logic, secrets, and third-party integrations on EAS Hosting.

  • Create routes with +api.ts suffix in the app directory; export named functions for HTTP methods (GET, POST, PUT, DELETE)
  • Handle query parameters, headers, JSON bodies, and dynamic route segments; add CORS headers for web clients
  • Access server-side secrets via process.env; set variables locally in .env or via eas env:create for production
  • Deploy to EAS Hosting (Cloudflare Workers) with eas deploy; use cloud databases (Turso, Supabase, PlanetScale) since filesystem and Node.js modules are unavailable
  • Test locally with npx expo serve and curl; call routes from client with standard fetch to relative paths like /api/hello

Raw SKILL.md

Raw SKILL.md is not available

Source-content enrichment has not stored the original Markdown yet. This read request will not trigger it.

Security audits

SnykWARN
SocketPASS
Gen Agent Trust HubPASS