{"id":19683892,"url":"https://github.com/prisma/read-replicas-demo","last_synced_at":"2025-10-09T05:33:46.342Z","repository":{"id":190364107,"uuid":"682153853","full_name":"prisma/read-replicas-demo","owner":"prisma","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-29T17:22:08.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-29T14:52:33.695Z","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/prisma.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":"2023-08-23T14:56:18.000Z","updated_at":"2025-07-13T15:35:24.000Z","dependencies_parsed_at":"2024-04-29T18:47:12.960Z","dependency_job_id":null,"html_url":"https://github.com/prisma/read-replicas-demo","commit_stats":null,"previous_names":["prisma/read-replicas-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prisma/read-replicas-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fread-replicas-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fread-replicas-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fread-replicas-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fread-replicas-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prisma","download_url":"https://codeload.github.com/prisma/read-replicas-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prisma%2Fread-replicas-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000741,"owners_count":26082932,"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-09T02:00:07.460Z","response_time":59,"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":"2024-11-11T18:15:59.759Z","updated_at":"2025-10-09T05:33:46.326Z","avatar_url":"https://github.com/prisma.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Read Replicas example\n\nThis example shows how to use database replication using the  [`@prisma/extension-read-replicas`](https://github.com/prisma/read-replicas-extension) extension in [Prisma Client](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client) in a **simple TypeScript script** to read and write data in a PostgreSQL database. \n\n## Getting started\n\n### 1. Download example and install dependencies\n\n\nClone this repository:\n\n```bash\ngit clone git@github.com:prisma/read-replicas-demo.git --depth=1\n```\n\nInstall npm dependencies:\n\n```bash\ncd read-replicas-demo\nnpm install\n```\n\n\u003c/details\u003e\n\n### 2. Create the database\n\nRun the following command to create your PostgreSQL database file. This also creates the `User` and `Post` tables that are defined in [`prisma/schema.prisma`](./prisma/schema.prisma):\n\n```bash\nnpx prisma migrate dev --name init\n```\n\n### 3. Run the script\n\nExecute the script with this command: \n\n```bash\nnpm run dev\n```\n\n## Next steps\n\n- Check out the [Prisma docs](https://www.prisma.io/docs)\n- Create issues and ask questions on [GitHub](https://github.com/prisma/prisma/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprisma%2Fread-replicas-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprisma%2Fread-replicas-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprisma%2Fread-replicas-demo/lists"}