Skip to content

Instantly share code, notes, and snippets.

View 0xbhak's full-sized avatar

Kiki Baihaki 0xbhak

View GitHub Profile
@0xbhak
0xbhak / schema.prisma
Created October 4, 2025 16:35
prisma
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client-js"
}
@0xbhak
0xbhak / siswaController.js
Created October 4, 2025 16:34
controller
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
export const getAllSiswa = async (req, res) => {
try {
const response = await prisma.datasiswa.findMany();
res.status(200).json(response);
} catch (error) {
res.status(400).json({ message: error.message });