Skip to content

Commit

Permalink
Merge pull request #4 from prisma/readme-install
Browse files Browse the repository at this point in the history
Add Installation instructions to the readme
  • Loading branch information
SevInf authored Aug 7, 2023
2 parents 315038a + c6039ff commit ce7c251
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,35 @@ This [Prisma Client Extension](https://www.prisma.io/docs/concepts/components/pr

Works best with Prisma 5.1+. Can work with earlier versions (4.16.2+) if [no result extensions](https://www.prisma.io/docs/concepts/components/prisma-client/client-extensions/result) are used at the same time.

## Installation

Depending on the package manager of your choice:

### `npm`:

```sh
npm install @prisma/extension-read-replicas
```

### `yarn`:

```sh
yarn add @prisma/extension-read-replicas
```

### `pnpm`:

```sh
pnpm add @prisma/extension-read-replicas
```

## Usage

### Initialization

```ts
import { PrismaClient } from '@prisma/client'
import { readReplicas } from '@prisma/read-replicas-extension'
import { readReplicas } from '@prisma/extension-read-replicas

const prisma = new PrismaClient().$extends(
readReplicas({
Expand Down

0 comments on commit ce7c251

Please sign in to comment.