{"id":21660120,"url":"https://github.com/vercel-labs/react-on-the-edge","last_synced_at":"2025-04-13T08:40:52.865Z","repository":{"id":43817412,"uuid":"506866773","full_name":"vercel-labs/react-on-the-edge","owner":"vercel-labs","description":"Server-rendered React using Vercel Edge Functions.","archived":false,"fork":false,"pushed_at":"2023-03-25T23:16:41.000Z","size":123,"stargazers_count":220,"open_issues_count":0,"forks_count":30,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-27T00:13:49.532Z","etag":null,"topics":["react","vercel"],"latest_commit_sha":null,"homepage":"https://react-on-the-edge.vercel.app/","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/vercel-labs.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}},"created_at":"2022-06-24T03:36:21.000Z","updated_at":"2024-12-26T19:59:50.000Z","dependencies_parsed_at":"2024-11-25T09:44:34.064Z","dependency_job_id":null,"html_url":"https://github.com/vercel-labs/react-on-the-edge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel-labs%2Freact-on-the-edge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel-labs%2Freact-on-the-edge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel-labs%2Freact-on-the-edge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel-labs%2Freact-on-the-edge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vercel-labs","download_url":"https://codeload.github.com/vercel-labs/react-on-the-edge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248686058,"owners_count":21145413,"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","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":["react","vercel"],"created_at":"2024-11-25T09:32:16.155Z","updated_at":"2025-04-13T08:40:52.837Z","avatar_url":"https://github.com/vercel-labs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# React on the Edge\n\n[`sveltekit-on-the-edge`](https://sveltekit-on-the-edge.vercel.app/) but on top of React. It uses `esbuild` for bundling and [Vercel Edge Functions](https://vercel.com/edge) for SSR.\n\nThis example is for framework builders and advanced usage of the low-level Vercel [Build Output API](https://vercel.com/docs/build-output-api/v3). If you're looking to develop a React application with dynamic Edge capabilities, we recommend [Next.js Middleware](https://nextjs.org/docs/advanced-features/middleware) and [Vercel Edge Functions](https://vercel.com/edge).\n\n## How to use\n\nRun `pnpm i` then:\n\n- To build: `pnpm build`\n- To run a local server: `pnpm start`\n\nTo build this demo with streaming (`renderToStream`) instead of `renderToString` run `USE_STREAMS=1 pnpm build`.\nAfter building, `.vercel/output` will be created which you can deploy via `vc --prebuilt`.\n\n## Architecture\n\n- `util/build.mjs` implements the build process on top of `esbuild` that bundles `src/app` into an Edge Function.\n- `util/start.mjs` implements a local server using the `edge-runtime` package that can locally run the build outputs.\n\n## Developing\n\nDue to the absence of a dev server, [`watchexec`](https://github.com/watchexec/watchexec) can be used as a replacement. Use `brew install watchexec` to install.\n\n```bash\nwatchexec -c -r --no-meta 'node util/build.mjs; node util/start.mjs'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel-labs%2Freact-on-the-edge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvercel-labs%2Freact-on-the-edge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel-labs%2Freact-on-the-edge/lists"}