{{ user.name }}
- -``` - -### Option B: `lib/prisma.ts` - -After running through the initial setup prompts, this module creates the `lib/prisma.ts` file which contains a global instance of Prisma Client. -```typescript file=lib/prisma.ts -import { PrismaClient } from '../prisma/generated/client' - -const prismaClientSingleton = () => { - return new PrismaClient() -} - -declare const globalThis: { - prismaGlobal: ReturnType{{ user.name }}
- -``` - -## Configuration - -You can configure the `@prisma/nuxt` module by using the `prisma` key in `nuxt.config.ts`: - -```ts file=nuxt.config.ts -export default defineNuxtConfig({ - // ... - prisma: { - // Options - } -}) -``` -{{ user?.name ?? "No user has been added yet." }}
- - ``` +Update your `.env` file with your database connection string: -3. Modify the `app.vue` file in the root directory to include the new server component using Nuxt Islands: - ```html file=app.vue - -No users yet.
+