{"id":25709568,"url":"https://github.com/exectx/exp-cloudflare-nextjs-opennext-durable-objects","last_synced_at":"2026-06-20T14:03:35.296Z","repository":{"id":278492169,"uuid":"935798640","full_name":"exectx/exp-cloudflare-nextjs-opennext-durable-objects","owner":"exectx","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-20T03:24:48.000Z","size":235,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T04:27:11.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/exectx.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":"2025-02-20T03:19:29.000Z","updated_at":"2025-02-20T03:24:50.000Z","dependencies_parsed_at":"2025-02-20T04:37:33.880Z","dependency_job_id":null,"html_url":"https://github.com/exectx/exp-cloudflare-nextjs-opennext-durable-objects","commit_stats":null,"previous_names":["exectx/exp-cloudflare-nextjs-opennext-durable-objects"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/exectx/exp-cloudflare-nextjs-opennext-durable-objects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exectx%2Fexp-cloudflare-nextjs-opennext-durable-objects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exectx%2Fexp-cloudflare-nextjs-opennext-durable-objects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exectx%2Fexp-cloudflare-nextjs-opennext-durable-objects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exectx%2Fexp-cloudflare-nextjs-opennext-durable-objects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exectx","download_url":"https://codeload.github.com/exectx/exp-cloudflare-nextjs-opennext-durable-objects/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exectx%2Fexp-cloudflare-nextjs-opennext-durable-objects/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34572426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"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-02-25T09:35:12.999Z","updated_at":"2026-06-20T14:03:35.278Z","avatar_url":"https://github.com/exectx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Experiment `Single Cloudflare Worker` + NextJS + Durable Objects + OpenNext\n\nThis is an experiment to see how to run Durable Objects in the same worker as a Next.js app using `opennext-cloudflare`.\nThe idea is to have a single worker that serves both the Next.js app and the Durable Object.\n\n\n![Screenshot of demo using Durable Object + NextJS + OpenNext Cloudflare](./demo.png)\n\n\n\u003e [!WARNING]\n\u003e This is a hack; it basically wraps the build output of `opennext-cloudflare` and adds a named export that points to the Durable Object class.\n\u003e You won't be able to use the development server, and you'll have to build the app every time you make changes to the Next.js app.\n\u003e This is based on one of the official Cloudflare Astro [templates](https://github.com/cloudflare/templates/blob/3ecfc97322d771cda2c2428cacdc1b5cf916e6e0/saas-admin-template/package.json#L57)\n\n## Steps\n\n1. Comment out the Durable Object in the `wrangler.jsonc` file\n\n2. Build the Next.js app:\n\n```bash\npnpm build:cf\n```\n\n3. Wrap the build output entry file:\n\n```bash\npnpm add:durable-object\n```\n\n4. Uncomment the Durable Object in the `wrangler.jsonc` file\n\n5. Run the worker:\n\n```bash\npnpm wrangler dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexectx%2Fexp-cloudflare-nextjs-opennext-durable-objects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexectx%2Fexp-cloudflare-nextjs-opennext-durable-objects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexectx%2Fexp-cloudflare-nextjs-opennext-durable-objects/lists"}