expo-api-routes

作者: expo

Expo Router中的API路由,用于在EAS Hosting上处理服务端逻辑、密钥和第三方集成。在app目录中创建以+api.ts后缀的路由;导出命名函数以处理HTTP方法(GET、POST、PUT、DELETE)。处理查询参数、请求头、JSON体和动态路由段;为Web客户端添加CORS头。通过process.env访问服务端密钥;在本地.env文件中设置变量,或通过eas env:create为生产环境设置。使用eas部署到EAS Hosting(Cloudflare Workers)...

npx skills add https://github.com/expo/skills --skill expo-api-routes

来自 expo 的更多技能

expo-upgrade
expo
框架(开源)。升级Expo SDK版本及修复依赖问题的指南。
apidevelopmentofficial
expo-data-fetching
expo
Framework (OSS). Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (`useLoaderData`).
official
android-e2e-testing
expo
在Android模拟器上使用ADB测试Expo Router功能。在实现原生Android功能后或验证Android上的UI行为时使用。
official
expo-dev-client
expo
通过EAS Build或在本地构建自定义Expo开发客户端,用于在物理设备上测试原生代码。仅在使用自定义原生模块、Apple目标(小组件、App Clips)或Expo Go中不包含的第三方原生代码时需要;建议先用npx expo start尝试Expo Go。支持云端构建并自动提交至TestFlight,或在本地机器上构建,输出.ipa(iOS)或.apk/.aab(Android)文件。需在eas.json中配置包含development profile的设置...
official
android-jetpack-compose
expo
Use when building Android UIs with Jetpack Compose, managing state with remember/mutableStateOf, or implementing declarative UI patterns.
official
swiftui-expert-skill
expo
Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, macOS-specific APIs, and iOS 26+ Liquid…
official
android-e2e-testing
expo
Test Expo Router features on Android emulators using ADB. Use after implementing native Android features or when verifying UI behavior on Android.
official
expo-api-docs
expo
Write TSDoc comments for Expo SDK APIs following official conventions. MUST USE when introducing new user-facing TypeScript APIs in expo-* packages - document…
official