@prisma/nuxt
@prisma/nuxt
Integrate Nuxt with Prisma ORM to simplify database access!
Nuxt Prisma
Are you a Nuxt developer? Or are you familiar with Prisma ORM and want to use it easily with Nuxt? Then this module is for you.
With this module, you can easily integrate Prisma ORM in your Nuxt app.
Features
- Seamlessly set up Prisma CLI, Prisma schema, Prisma Migrate, and Prisma Client
- Easily access Prisma Studio within Nuxt DevTools
- Auto-imported
usePrismaClient()
composable for your Vue files
Quick setup
- Add
@prisma/nuxt
dependency to your projectnpm install @prisma/nuxt
- Add
@prisma/nuxt
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({ modules: ["@prisma/nuxt"], });
- Start the development server:
npm run dev
Starting the development server will:- Automatically install the Prisma CLI
- Initialize a Prisma project with a SQLite database
- Create an User and Post example model in the Prisma Schema
- Prompt you to run a migration to create database tables with Prisma Migrate
- Install and generate a Prisma Client
- Prompt you to start the Prisma Studio
To learn more about how to use the module, visit our documentation