Breaking News: Grepper is joining You.com. 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

Contents


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

    0

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

    global.prisma

    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


    X

    Continue with Google

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

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