{"id":31556146,"url":"https://github.com/jongan69/expoexpress","last_synced_at":"2025-10-04T22:49:20.147Z","repository":{"id":296745918,"uuid":"994347480","full_name":"jongan69/ExpoExpress","owner":"jongan69","description":"A drag and drop express server for expo api routes","archived":false,"fork":false,"pushed_at":"2025-06-01T19:19:39.000Z","size":137,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-02T05:02:36.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jongan69.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-01T18:39:56.000Z","updated_at":"2025-06-01T19:20:27.000Z","dependencies_parsed_at":"2025-06-02T05:03:04.689Z","dependency_job_id":"ae65c269-4d4a-4f93-9578-6fa55ed79d51","html_url":"https://github.com/jongan69/ExpoExpress","commit_stats":null,"previous_names":["jongan69/expoexpress"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jongan69/ExpoExpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2FExpoExpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2FExpoExpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2FExpoExpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2FExpoExpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jongan69","download_url":"https://codeload.github.com/jongan69/ExpoExpress/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2FExpoExpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278386115,"owners_count":25978109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-04T22:49:13.751Z","updated_at":"2025-10-04T22:49:20.142Z","avatar_url":"https://github.com/jongan69.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExpoExpress\n\n**Easily deploy your Expo API Routes as a standalone Express server—no Expo web build required!**\n\n## Why?\n\nExpo's API Routes feature is a powerful way to add backend endpoints to your Expo app, but currently, deploying these routes outside of Expo's web build (`npx expo export -p web`) is not officially supported. Many developers only need the API endpoints for their mobile apps and run into issues when their project can't build for web (e.g., due to incompatible dependencies or web-only errors).\n\n**ExpoExpress** solves this by letting you drag-and-drop your `api` folder (from your Expo project) into this server, instantly exposing your API routes via Express—no Expo, no web build, no hassle.\n\n---\n\n## Features\n\n- **Zero-config:** Just copy your `api` folder here and run the server.\n- **No Expo dependency:** Does not require Expo or any Expo CLI tooling.\n- **Automatic route registration:** All your API routes are auto-registered, matching the Expo API Routes convention.\n- **Supports all HTTP methods:** GET, POST, PUT, DELETE, PATCH, OPTIONS.\n- **TypeScript support:** Write your routes in TypeScript, compile, and serve.\n\n---\n\n## How It Works\n\n- Place your Expo-style `api` folder inside the `/api` directory of this project.\n- The server recursively loads all `.js` files in `/api`, mapping them to Express routes using the same conventions as Expo API Routes.\n- Each exported HTTP method (`GET`, `POST`, etc.) in your route files is registered as an Express handler.\n\n---\n\n## Getting Started\n\n### 1. Clone this repo\n\n```sh\ngit clone https://github.com/jongan69/ExpoExpress.git\ncd ExpoExpress\n```\n\n### 2. Copy your API routes\n\nCopy your `api` folder from your Expo project into this repo's root directory:\n\n```\n/ExpoExpress\n  /api\n    /your-api-routes-here\n  index.ts\n  package.json\n  ...\n```\n\n### 3. Install dependencies\n\n```sh\nnpm install\n# or\nyarn install\n# or\npnpm install\n# or \nbun install\n```\n\n\n### 4. Compile TypeScript (if using TypeScript)\n\n```sh\nnpm run compile\n```\n\nThis will:\n- Compile your TypeScript files to JavaScript.\n- Fix import extensions for Node.js compatibility.\n\n### 5. Start the server\n\n```sh\nnpm start\n```\n\nThe server will run on `http://localhost:3001` by default (configurable via the `PORT` environment variable).\n\n---\n\n## Example\n\nSuppose you have the following Expo API route:\n\n```js\n// api/hello/+api.ts\nexport async function GET(request: Request) {\n  return new Response('Hello from Expo API Route!');\n}\n```\n\nAfter copying this into `/api/hello/+api.ts` and starting the server, you can access:\n\n```\nGET http://localhost:3001/hello\n```\n\n---\n\n## Supported Features\n\n- **Route mapping:** Follows Expo's API route conventions (e.g., `/api/hello/+api.ts` → `/hello`).\n- **HTTP methods:** Export `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, or `OPTIONS` functions from your route files.\n- **Request/Response:** Handlers use the Fetch API's `Request` and `Response` objects, just like in Expo.\n\n---\n\n## Limitations\n\n- Only `.js` files are loaded at runtime. If using TypeScript, ensure you compile to `.js` before running.\n- Middleware and advanced Express features are not auto-injected; this is a minimal bridge for Expo API Routes.\n- Not all Expo-specific APIs (e.g., `expo-auth-session`) will work outside the Expo runtime.\n\n---\n\n## Why not just use `npx expo export -p web`?\n\n- If your project can't build for web (e.g., due to incompatible dependencies, web-only errors, or you simply don't need a web app), Expo's export command won't work.\n- This server lets you deploy your API endpoints independently of the web build process.\n\n---\n\n## FAQ\n\n**Q: Can I use this in production?**  \nA: This is a minimal bridge for deploying API endpoints. For production, consider adding your own authentication, rate limiting, and error handling as needed.\n\n**Q: Does this support dynamic routes?**  \nA: Yes, as long as your file structure matches Expo's API Routes conventions.\n\n**Q: What about middlewares?**  \nA: You can add Express middlewares in `index.ts` as needed.\n\n---\n\n## Credits\n\nInspired by the needs of the Expo community ([see issue #30450](https://github.com/expo/expo/issues/30450)).\n\n---\n\n## License\n\nMIT\n\n---\n\n**Happy hacking!** If you have suggestions or run into issues, feel free to open a PR or issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongan69%2Fexpoexpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjongan69%2Fexpoexpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongan69%2Fexpoexpress/lists"}