Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Aolin <[email protected]>
  • Loading branch information
shiyuhang0 and Oreoxmt authored Apr 7, 2024
1 parent a48a315 commit 19db7b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tidb-cloud/serverless-driver-prisma-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ npm install @tidbcloud/serverless

To use the Prisma adapter, you need to enable the `driverAdapters` feature in the `schema.prisma` file. For example:

```
```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
Expand All @@ -43,7 +43,7 @@ datasource db {

Before using Prisma Client, you need to initialize it with `@tidbcloud/prisma-adapter`. For example:

```
```js
import { connect } from '@tidbcloud/serverless';
import { PrismaTiDBCloud } from '@tidbcloud/prisma-adapter';
import { PrismaClient } from '@prisma/client';
Expand Down Expand Up @@ -262,7 +262,7 @@ To complete this tutorial, you need the following:

## Use the Prisma adapter in edge environments

You can use `@tidbcloud/prisma-adapter` v5.11.0 or a later version in edge environments such as Vercel Edge Function and Cloudflare Workers.
You can use `@tidbcloud/prisma-adapter` v5.11.0 or a later version in edge environments such as Vercel Edge Functions and Cloudflare Workers.

- [Vercel Edge Function example](https://github.com/tidbcloud/serverless-driver-example/tree/main/prisma/prisma-vercel-example)
- [Cloudflare Worker example](https://github.com/tidbcloud/serverless-driver-example/tree/main/prisma/prisma-cloudflare-worker-example)
- [Cloudflare Workers example](https://github.com/tidbcloud/serverless-driver-example/tree/main/prisma/prisma-cloudflare-worker-example)

0 comments on commit 19db7b3

Please sign in to comment.