Configuration
Configure Nuxt Prisma via the prisma
property.
nuxt.config.ts
export default defineNuxtConfig({
modules: ['@prisma/nuxt'],
prisma: {
/* default module options */
datasourceUrl: process.env.DATABASE_URL,
log: [],
errorFormat: 'colorless',
}
})
datasourceUrl
- Default:
process.env.DATABASE_URL
Database connection string to connect to your database.
log
- Example:
['query','info','warn','error']
Determines the type and level of logging to the console.
errorFormat
- Default:
'colorless'
Determines the level of error formatting.
Table of Contents