Breaking News: Grepper is joining Read the official announcement!
Check it out

prisma export for local development

Ary Tiwa answered on June 4, 2023 Popularity 5/10 Helpfulness 2/10


More Related Answers

  • prisma client from file
  • install prisma nextjs
  • nextjs global prisma
  • how to set up prisma in nodejs
  • prisma next js setup
  • prisma include where
  • prisma database example
  • prisma write database

  • prisma export for local development


    import { PrismaClient } from '@prisma/client';


    const prisma = global.prisma || new PrismaClient()

    if (process.env.NODE_ENV == "development") {

    global.prisma = prisma


    export { prisma }; 

    Popularity 5/10 Helpfulness 2/10 Language javascript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Jun 04 2023
    Ary Tiwa
    0 Answers  Avg Quality 2/10


    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.