Skip to main content

Prisma module 📝

This module is used to extend the functionality of @prisma/client and prisma.

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

const { prisma } = onPrisma(PrismaClient);
// "path file" ~ ./utils/rocketKit
import { createRocket } from "next-rocket-kit";
export const rocket = createRocket();
export const { Http } = rocket;
// "path file" ~ ./src/app/api/route.ts
import { Http } from "@/utils/rocketKit";
import { Route } from "@/utils/Route";

// End Point GET basic
export const GET = Route({
Handler(req, reply, context) {
return reply.json(
{
message: Http.ReasonPhrases.OK, // "OK"
},
{
status: Http.StatusCodes.OK, // 200
}
);
},
});