Skip to content

Instantly share code, notes, and snippets.

=====siswaController.js=====
import { PrismaClient } from "@prisma/client"
const prisma = new PrismaClient
export const getSiswa=async(req,res)=>{
try{
const response = await prisma.siswa.findMany()
res.status(200).json(response)
} catch (error) {
res.status(500).json({ error: "Internal Server Error" })