diff --git a/content/200-orm/200-prisma-client/000-setup-and-configuration/050-databases-connections/200-pgbouncer.mdx b/content/200-orm/200-prisma-client/000-setup-and-configuration/050-databases-connections/200-pgbouncer.mdx index 5a20c86c5f..ec68d67ff1 100644 --- a/content/200-orm/200-prisma-client/000-setup-and-configuration/050-databases-connections/200-pgbouncer.mdx +++ b/content/200-orm/200-prisma-client/000-setup-and-configuration/050-databases-connections/200-pgbouncer.mdx @@ -9,10 +9,9 @@ Usually, this works transparently, but some connection poolers only support a li :::info -Looking for an easy and infrastructure-free option? Try [Prisma Accelerate](https://www.prisma.io/accelerate?utm_source=docs&utm_campaign=pgbouncer-help)! Little to no setup and is compatible with all databases that Prisma ORM supports. - -Get started with Prisma Accelerate [here](https://console.prisma.io?utm_source=docs&utm_campaign=pgbouncer-help). +Looking for an easy, infrastructure-free solution? Try [Prisma Accelerate](https://www.prisma.io/accelerate?utm_source=docs&utm_campaign=pgbouncer-help)! It requires little to no setup and works seamlessly with all databases supported by Prisma ORM. +Ready to begin? Get started with Prisma Accelerate by clicking [here](https://console.prisma.io?utm_source=docs&utm_campaign=pgbouncer-help). ::: ## PgBouncer diff --git a/content/200-orm/800-more/600-help-and-troubleshooting/400-nextjs-help.mdx b/content/200-orm/800-more/600-help-and-troubleshooting/400-nextjs-help.mdx index cf39f164eb..678ca28249 100644 --- a/content/200-orm/800-more/600-help-and-troubleshooting/400-nextjs-help.mdx +++ b/content/200-orm/800-more/600-help-and-troubleshooting/400-nextjs-help.mdx @@ -15,17 +15,17 @@ Prisma ORM and Next.js form a powerful combination for building modern, server-s --- -## Best Practices for Using Prisma Client in Development +## Best practices for using Prisma Client in development -### Avoid Multiple Prisma Client Instances +### Avoid multiple Prisma Client instances When developing a Next.js application, one common issue is accidentally creating multiple instances of the Prisma Client. This often occurs due to Next.js’s hot-reloading feature in development. -#### Why This Happens +#### Why this happens Next.js’s hot-reloading feature reloads modules frequently to reflect code changes instantly. However, this can lead to multiple instances of Prisma Client being created, which consumes resources and might cause unexpected behavior. -#### Recommended Solution +#### Recommended solution To avoid this, create a single Prisma Client instance by using a global variable: @@ -47,16 +47,16 @@ Using this approach ensures that only one instance of Prisma Client exists, even ## Setting Up Prisma ORM in a Monorepo -### Challenges of Using Prisma ORM in Monorepos +### Challenges of using Prisma ORM in monorepos Monorepos allow multiple projects to share code and dependencies, making them a popular choice for modern development. However, using Prisma ORM in a monorepo can present challenges related to dependency resolution and schema management. -#### Key Issues +#### Key issues 1. **Dependency Resolution**: Multiple packages in a monorepo might lead to conflicts if they use different version of Prisma ORM. 2. **Schema Centralization**: Managing a single Prisma Schema across multiple projects can be complex. -#### Best Practices for Monorepo Integration +#### Best practices for monorepo integration - **Centralize the Prisma Schema**: Place the `schema.prisma` file in a shared package, such as `@myorg/db`, to ensure consistency. - **Install Dependencies in the Root**: Avoid version conflicts by installing Prisma ORM as a dependency at the root of the monorepo. @@ -74,9 +74,9 @@ This approach keeps your Prisma Schema and generated client in sync across all p --- -## Dynamic Usage of Prisma Client in Next.js +## Dynamic usage of Prisma Client in Next.js -### Handling Dynamic Scenarios +### Handling dynamic scenarios Dynamic use cases, such as working with tenant-specific databases, require additional consideration when using Prisma ORM with Next.js.