{"id":15780423,"url":"https://github.com/ecklf/react-edge-functions","last_synced_at":"2025-03-31T16:35:14.144Z","repository":{"id":237452757,"uuid":"743555945","full_name":"ecklf/react-edge-functions","owner":"ecklf","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-15T13:42:30.000Z","size":119,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-04T18:41:49.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://react-edge-functions-nu.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/ecklf.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":"2024-01-15T13:42:25.000Z","updated_at":"2024-01-15T14:26:35.000Z","dependencies_parsed_at":"2024-05-02T02:08:40.577Z","dependency_job_id":"40a7a36f-73e5-4b84-947c-2740daa283ea","html_url":"https://github.com/ecklf/react-edge-functions","commit_stats":null,"previous_names":["ecklf/react-edge-functions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecklf%2Freact-edge-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecklf%2Freact-edge-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecklf%2Freact-edge-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecklf%2Freact-edge-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecklf","download_url":"https://codeload.github.com/ecklf/react-edge-functions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246498518,"owners_count":20787330,"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":[],"created_at":"2024-10-04T18:41:32.239Z","updated_at":"2025-03-31T16:35:14.121Z","avatar_url":"https://github.com/ecklf.png","language":"TypeScript","funding_links":[],"categories":[],"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%2Fecklf%2Freact-edge-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecklf%2Freact-edge-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecklf%2Freact-edge-functions/lists"}