This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { PrismaClient } = require("@prisma/client"); | |
const prisma = new PrismaClient(); | |
async function main() { | |
try { | |
const mousesCategory = await prisma.category.create({ | |
data: { | |
name: "Mouses", | |
slug: "mouses", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
@layer base { | |
:root { | |
--background: 0 0% 4%; | |
--foreground: 0 0% 100%; | |
--card: 0 0% 4%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { PrismaClient } from "@prisma/client"; | |
declare global { | |
var cachedPrisma: PrismaClient; | |
} | |
let prisma: PrismaClient; | |
if (process.env.NODE_ENV === "production") { | |
prisma = new PrismaClient(); | |
} else { |