{"id":15704070,"url":"https://github.com/malithmcr/multi-zones-next-js","last_synced_at":"2025-05-12T16:32:56.381Z","repository":{"id":97358440,"uuid":"384800363","full_name":"malithmcr/multi-zones-next-js","owner":"malithmcr","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-10T22:02:01.000Z","size":72,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T00:38:30.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/malithmcr.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":"2021-07-10T21:51:45.000Z","updated_at":"2025-01-05T07:56:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b6e42a1-3ba2-42b3-9e3e-6f610a72c1a3","html_url":"https://github.com/malithmcr/multi-zones-next-js","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"7c7e62ca1f275e1a9f1db61fdf06e6de56f37ebc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithmcr%2Fmulti-zones-next-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithmcr%2Fmulti-zones-next-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithmcr%2Fmulti-zones-next-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithmcr%2Fmulti-zones-next-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malithmcr","download_url":"https://codeload.github.com/malithmcr/multi-zones-next-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253777109,"owners_count":21962629,"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-03T20:10:13.676Z","updated_at":"2025-05-12T16:32:56.326Z","avatar_url":"https://github.com/malithmcr.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Using multiple zones\n\nWith Next.js you can use multiple apps as a single app using its [multi-zones feature](https://nextjs.org/docs/advanced-features/multi-zones). This is an example showing how to use it.\n\n- All pages should be unique across zones. For example, the `marketplace` app should not have a `pages/blog/index.js` page.\n- The `marketplace` app is the main app and therefore it includes the rewrites that map to the `blog` app in [next.config.js](home/next.config.js)\n- The `blog` app sets [`basePath`](https://nextjs.org/docs/api-reference/next.config.js/basepath) to `/blog` so that generated pages, Next.js assets and public assets are within the `/blog` subfolder.\n\n## How to use\n\nExecute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:\n\n```bash\nnpx create-next-app --example with-zones with-zones-app\n# or\nyarn create next-app --example with-zones with-zones-app\n```\n\nWith multi zones you have multiple Next.js apps over a single app, therefore every app has its own dependencies and it runs independently.\n\nTo start the `/` run the following commands from the root directory:\n\n```bash\ncd marketplace\nnpm install \u0026\u0026 npm run dev\n# or\ncd marketplace\nyarn \u0026\u0026 yarn dev\n```\n\nThe `/` app should be up and running in [http://localhost:3000](http://localhost:3000)!\n\nStarting the `/blog` app follows a very similar process. In a new terminal, run the following commands from the root directory :\n\n```bash\ncd blog\nnpm install \u0026\u0026 npm run dev\n# or\ncd blog\nyarn \u0026\u0026 yarn dev\n```\n\nThe `blog` app should be up and running in [http://localhost:8080](http://localhost:8080)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalithmcr%2Fmulti-zones-next-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalithmcr%2Fmulti-zones-next-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalithmcr%2Fmulti-zones-next-js/lists"}